We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ae0ca6 commit 7fae67cCopy full SHA for 7fae67c
apps/webapp/app/services/runs/performRunExecutionV3.server.ts
@@ -207,6 +207,19 @@ export class PerformRunExecutionV3Service {
207
208
forceYieldCoordinator.deregisterRun(run.id);
209
210
+ //if the run has been canceled while it's being executed, we shouldn't do anything more
211
+ const updatedRun = await this.#prismaClient.jobRun.findUnique({
212
+ select: {
213
+ status: true,
214
+ },
215
+ where: {
216
+ id: run.id,
217
218
+ });
219
+ if (!updatedRun || updatedRun.status === "CANCELED") {
220
+ return;
221
+ }
222
+
223
if (!response) {
224
return await this.#failRunExecutionWithRetry(
225
run,
0 commit comments