There was an error while loading. Please reload this page.
1 parent 158214a commit 5ab2db2Copy full SHA for 5ab2db2
1 file changed
apps/sim/app/api/cron/cleanup-stale-executions/route.ts
@@ -504,9 +504,10 @@ export const GET = withRouteHandler(async (request: NextRequest) => {
504
})
505
}
506
507
- const retentionThreshold = new Date(Date.now() - JOB_RETENTION_HOURS * 60 * 60 * 1000)
+ const retentionNow = Date.now()
508
+ const retentionThreshold = new Date(retentionNow - JOB_RETENTION_HOURS * 60 * 60 * 1000)
509
const irrecoverableCarrierRetentionThreshold = new Date(
- Date.now() - SCHEDULE_CARRIER_IRRECOVERABLE_RETENTION_HOURS * 60 * 60 * 1000
510
+ retentionNow - SCHEDULE_CARRIER_IRRECOVERABLE_RETENTION_HOURS * 60 * 60 * 1000
511
)
512
let asyncJobsDeleted = 0
513
0 commit comments