mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 23:25:24 +00:00
release-2.9.2 (#1566)
* fix: stop full database rewrites on every plugin db call * fix: restore release video link in 2.9.2 notes * fix: use TERMIX_PAT in workflows
This commit is contained in:
1 parent
40df00bd95
commit
2b309e9582
19 files changed
+342
-87
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Clears the audit rows 2.9.1 wrote on every background plugin query.
|
||||
*
|
||||
* They filled the capped audit log and pushed real entries out. Idempotent,
|
||||
* so it runs on every boot, before plugins activate and audit again.
|
||||
*/
|
||||
|
||||
import { databaseLogger } from "../utils/logger.js";
|
||||
import { getErrorMessage } from "../utils/error-message.js";
|
||||
import { createCurrentAuditLogRepository } from "../database/repositories/factory.js";
|
||||
import { DatabaseSaveTrigger } from "../utils/database-save-trigger.js";
|
||||
|
||||
export async function runAuditNoiseCleanup(): Promise<number> {
|
||||
try {
|
||||
const removed =
|
||||
await createCurrentAuditLogRepository().deleteRoutinePluginNoise();
|
||||
if (removed > 0) {
|
||||
await DatabaseSaveTrigger.forceSave("audit_noise_cleanup");
|
||||
databaseLogger.info("Removed routine plugin audit entries", {
|
||||
operation: "audit_noise_cleanup",
|
||||
removed,
|
||||
});
|
||||
}
|
||||
return removed;
|
||||
} catch (error) {
|
||||
databaseLogger.warn("Failed to remove routine plugin audit entries", {
|
||||
operation: "audit_noise_cleanup_failed",
|
||||
error: getErrorMessage(error),
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user