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:
Adrien de Peretti
2025-09-19 16:38:14 +02:00
committed by GitHub
parent e5a82518f1
commit cb716856b6
3 changed files with 11 additions and 11 deletions

View File

@@ -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() {