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): add frequent resource cleanup job with configurable timeout
Victor Hugo dos Santosf7e367771173
diff --git a/backend/src/services/resource-cleanup/resource-cleanup-queue.ts b/backend/src/services/resource-cleanup/resource-cleanup-queue.tsindex 4a24ed8f95..0bf67b7aed 100644--- a/backend/src/services/resource-cleanup/resource-cleanup-queue.ts+++ b/backend/src/services/resource-cleanup/resource-cleanup-queue.ts@@ -76,6 +76,7 @@ export const dailyResourceCleanUpQueueServiceFactory = ({const init = () => {const dailyCleanupTimeoutMs = appCfg.isDailyResourceCleanUpDevelopmentMode ? 5 * 60_000 : 45 * 60_000;+ const frequentCleanupTimeoutMs = appCfg.isDailyResourceCleanUpDevelopmentMode ? 5 * 60_000 : 10 * 60_000;cronJob.register({name: CronJobName.DailyResourceCleanup,pattern: appCfg.isDailyResourceCleanUpDevelopmentMode ? "*/5 * * * *" : "0 0 * * *",@@ -112,8 +113,10 @@ export const dailyResourceCleanUpQueueServiceFactory = ({cronJob.register({name: CronJobName.FrequentResourceCleanup,pattern: appCfg.isDailyResourceCleanUpDevelopmentMode ? "*/5 * * * *" : "0 * * * *",- runHashTtlS: 2 * 24 * 60 * 60,+ runHashTtlS: 1 * 24 * 60 * 60,enabled: !appCfg.isSecondaryInstance,+ handlerTimeoutMs: frequentCleanupTimeoutMs,+ leaseDurationMs: frequentCleanupTimeoutMs,handler: async () => {logger.info(`cron[${CronJobName.FrequentResourceCleanup}]: task started`);await identityAccessTokenDAL.removeExpiredTokens();