Remove failing workflow when already started (#16301)
This is a temporary fix that needs to be revisited. It seems that with the new enqueue system we are enqueuing jobs multiple times due to race condition. We likely want to only consider job that have been created more than x secs ago
This commit is contained in:
-10
@@ -150,16 +150,6 @@ export class WorkflowRunWorkspaceService {
|
||||
workspaceId,
|
||||
});
|
||||
|
||||
if (
|
||||
workflowRunToUpdate.status === WorkflowRunStatus.COMPLETED ||
|
||||
workflowRunToUpdate.status === WorkflowRunStatus.FAILED
|
||||
) {
|
||||
throw new WorkflowRunException(
|
||||
'Cannot start a workflow run already ended',
|
||||
WorkflowRunExceptionCode.INVALID_OPERATION,
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
workflowRunToUpdate.status !== WorkflowRunStatus.ENQUEUED &&
|
||||
workflowRunToUpdate.status !== WorkflowRunStatus.NOT_STARTED
|
||||
|
||||
Reference in New Issue
Block a user