File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
internal-packages/run-engine/src/engine/systems Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { PrismaClientOrTransaction } from "@trigger.dev/database";
88import { getRunWithBackgroundWorkerTasks } from "../db/worker.js" ;
99import { sendNotificationToWorker } from "../eventBus.js" ;
1010import { getMachinePreset } from "../machinePresets.js" ;
11- import { isDequeueableExecutionStatus } from "../statuses.js" ;
11+ import { isDequeueableExecutionStatus , isExecuting } from "../statuses.js" ;
1212import { RunEngineOptions } from "../types.js" ;
1313import { ExecutionSnapshotSystem , getLatestExecutionSnapshot } from "./executionSnapshotSystem.js" ;
1414import { RunAttemptSystem } from "./runAttemptSystem.js" ;
@@ -132,9 +132,16 @@ export class DequeueSystem {
132132 } ,
133133 tx : prisma ,
134134 } ) ;
135- this . $ . logger . error (
136- `RunEngine.dequeueFromWorkerQueue(): Run is not in a valid state to be dequeued: ${ runId } \n ${ snapshot . id } :${ snapshot . executionStatus } `
137- ) ;
135+
136+ if ( isExecuting ( snapshot . executionStatus ) ) {
137+ this . $ . logger . error (
138+ `RunEngine.dequeueFromWorkerQueue(): Run is not in a valid state to be dequeued: ${ runId } \n ${ snapshot . id } :${ snapshot . executionStatus } `
139+ ) ;
140+ } else {
141+ this . $ . logger . warn (
142+ `RunEngine.dequeueFromWorkerQueue(): Run is in an expected not valid state to be dequeued: ${ runId } \n ${ snapshot . id } :${ snapshot . executionStatus } `
143+ ) ;
144+ }
138145
139146 return ;
140147 }
You can’t perform that action at this time.
0 commit comments