diff --git a/src/dbos-executor.ts b/src/dbos-executor.ts index 5c79f80a..29cf0f4e 100644 --- a/src/dbos-executor.ts +++ b/src/dbos-executor.ts @@ -1598,12 +1598,11 @@ export class DBOSExecutor implements DBOSExecutorContext { // If this is a serialization failure, i.e., some other DBOS process is trying to re-enqueue or complete the workflow, skip it. if (this.userDatabase.isRetriableTransactionError(e)) { this.logger.warn(`Failed to re-enqueue workflow ${pendingWorkflow.workflowUUID}: ${(e as Error).message}`); + continue; } else { throw new DBOSWorkflowRecoveryError(pendingWorkflow.workflowUUID, (e as Error).message); } - continue; } - continue; } else { pendingWorkflows.push(pendingWorkflow.workflowUUID); } diff --git a/tests/wfqueue.test.ts b/tests/wfqueue.test.ts index 73a837da..5da80561 100644 --- a/tests/wfqueue.test.ts +++ b/tests/wfqueue.test.ts @@ -21,7 +21,6 @@ import { } from "../src/debugpoint"; import { DBOSConflictingWorkflowError } from "../src/error"; - const queue = new WorkflowQueue("testQ"); const serialqueue = new WorkflowQueue("serialQ", 1); const serialqueueLimited = new WorkflowQueue("serialQL", { concurrency: 1, rateLimit: { limitPerPeriod: 10, periodSec: 1 } }); @@ -449,7 +448,7 @@ describe("queued-wf-tests-recovery", () => { expect((await wfh3.getStatus())?.status).toBe(StatusString.ENQUEUED); // Unblock the two first workflows - await TestWFs.blockedWorkflowResolve?.(); + TestWFs.blockedWorkflowResolve?.(); expect(await wfh1.getResult()).toBe(null); expect(await wfh2.getResult()).toBe(null); // Now the third workflow should have been dequeeud and complete