Improve workflow queue cron reliability (#13818)
Improve workflow enqueue cron : instead of relying on the cache to know how many workflows we can enqueue, query the DB. Then set the cache and process the not started workflows. Also adding a second cron that will look for workflows enqueued one hour ago or more and put these back in the not started status. This will allow the first cron to start these again.
This commit is contained in:
+10
@@ -90,6 +90,16 @@ export class WorkflowRunWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
})
|
||||
name: string;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: WORKFLOW_RUN_STANDARD_FIELD_IDS.enqueuedAt,
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
label: msg`Workflow run enqueued at`,
|
||||
description: msg`Workflow run enqueued at`,
|
||||
icon: 'IconHistory',
|
||||
})
|
||||
@WorkspaceIsNullable()
|
||||
enqueuedAt: Date | null;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: WORKFLOW_RUN_STANDARD_FIELD_IDS.startedAt,
|
||||
type: FieldMetadataType.DATE_TIME,
|
||||
|
||||
Reference in New Issue
Block a user