Set the checkpointEventId in marqs when the checkpoint is created for batchTriggerAndWait
🚀 Publish Trigger.dev Docker / units (push) Failing after 10m41s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 10m42s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-infra (push) Has been skipped

This should fix a horrible race condition when at max concurrency
This commit is contained in:
Matt Aitken
2024-09-12 13:29:17 +01:00
parent c183416ae0
commit 7850e442c8
@@ -258,6 +258,16 @@ export class CreateCheckpointService extends BaseService {
};
}
//if there's a message in the queue, we make sure the checkpoint event is on it
await marqs?.replaceMessage(
attempt.taskRun.id,
{
checkpointEventId: checkpointEvent.id,
},
undefined,
true
);
await ResumeBatchRunService.enqueue(batchRun.id, this._prisma);
return {