fix(engine): Always create cleaner job (#13557)
RESOLVES CORE-1206 **What** Instead of removing cleaner repeatable job and risk to remove it while other instances are still up, we always create it, since the id of a job is unique and we give one to the job, if already present it wont get added
This commit is contained in:
committed by
GitHub
parent
e5a82518f1
commit
cb716856b6
@@ -29,6 +29,8 @@ import { WorkflowOrchestratorService } from "@services"
|
||||
import { type CronExpression, parseExpression } from "cron-parser"
|
||||
import { WorkflowExecution } from "../models/workflow-execution"
|
||||
|
||||
const THIRTY_MINUTES_IN_MS = 1000 * 60 * 30
|
||||
|
||||
function calculateDelayFromExpression(expression: CronExpression): number {
|
||||
const nextTime = expression.next().getTime()
|
||||
const now = Date.now()
|
||||
@@ -127,7 +129,7 @@ export class InMemoryDistributedTransactionStorage
|
||||
try {
|
||||
await this.clearExpiredExecutions()
|
||||
} catch {}
|
||||
}, 1000 * 60 * 60)
|
||||
}, THIRTY_MINUTES_IN_MS)
|
||||
}
|
||||
|
||||
async onApplicationShutdown() {
|
||||
|
||||
Reference in New Issue
Block a user