Skip to content

Commit

Permalink
add sanity check for bull timeout issue
Browse files Browse the repository at this point in the history
  • Loading branch information
flipswitchingmonkey committed Oct 13, 2023
1 parent 1307d48 commit 62c51e5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/cli/src/WorkflowRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ export class WorkflowRunner {
) {
ErrorReporter.error(error);

const isQueueMode = config.getEnv('executions.mode') === 'queue';

// in queue mode, first do a sanity run for the edge case that the execution was not marked as stalled
// by Bull even though it executed successfully, see https://github.com/OptimalBits/bull/issues/1415

if (isQueueMode && executionMode !== 'manual') {
const executionWithoutData = await Container.get(ExecutionRepository).findSingleExecution(
executionId,
{
includeData: false,
},
);
if (executionWithoutData?.finished === true && executionWithoutData?.status === 'success') {
// false positive, execution was successful
return;
}
}

const fullRunData: IRun = {
data: {
resultData: {
Expand Down

0 comments on commit 62c51e5

Please sign in to comment.