Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat(resource-cleanup): enhance daily resource cleanup logic with ClickHouse audit log condition
Victor Hugo dos Santos8e5053fdc9d2
diff --git a/backend/src/services/resource-cleanup/resource-cleanup-queue.ts b/backend/src/services/resource-cleanup/resource-cleanup-queue.tsindex 4ad85d675c..884c176410 100644--- a/backend/src/services/resource-cleanup/resource-cleanup-queue.ts+++ b/backend/src/services/resource-cleanup/resource-cleanup-queue.ts@@ -81,6 +81,7 @@ export const dailyResourceCleanUpQueueServiceFactory = ({const lightCleanupTimeoutMs = devMode ? 5 * 60_000 : 15 * 60_000;const dailyNotificationTimeoutMs = devMode ? 5 * 60_000 : 15 * 60_000;const frequentCleanupTimeoutMs = devMode ? 5 * 60_000 : 10 * 60_000;+ const isClickHouseAuditLogEnabled = appCfg.isClickHouseConfigured && appCfg.CLICKHOUSE_AUDIT_LOG_ENABLED;cronJob.register({name: CronJobName.DailyResourceCleanup,@@ -136,7 +137,7 @@ export const dailyResourceCleanUpQueueServiceFactory = ({runHashTtlS: 3 * 24 * 60 * 60,handlerTimeoutMs: heavyCleanupTimeoutMs,leaseDurationMs: heavyCleanupTimeoutMs,- enabled: !appCfg.isSecondaryInstance,+ enabled: !appCfg.isSecondaryInstance && !isClickHouseAuditLogEnabled,handler: async () => {logger.info(`cron[${CronJobName.DailyAuditLogCleanup}]: task started`);await auditLogDAL.pruneAuditLog();