chore(): Workflow engine timers and notification improvements (#13434)

RESOLVES CORE-1177

**What**
main changes are:
- not blocking execution when notifying
- timers management
- race condition checks improvements
This commit is contained in:
Adrien de Peretti
2025-09-08 20:19:55 +02:00
committed by GitHub
parent b776fd55dc
commit fc4d5f0ac9
14 changed files with 464 additions and 213 deletions

View File

@@ -38,4 +38,21 @@ export const WorkflowExecution = model
on: ["run_id"],
where: "deleted_at IS NULL",
},
{
on: ["workflow_id", "transaction_id"],
where: "deleted_at IS NULL",
},
{
on: ["state", "updated_at"],
where: "deleted_at IS NULL",
},
{
on: ["retention_time", "updated_at", "state"],
where: "deleted_at IS NULL AND retention_time IS NOT NULL",
},
{
on: ["updated_at", "retention_time"],
where:
"deleted_at IS NULL AND retention_time IS NOT NULL AND state IN ('done', 'failed', 'reverted')",
},
])