feat(workflows-*): Allow to re run non idempotent but stored workflow with the same transaction id if considered done (#12362)

This commit is contained in:
Adrien de Peretti
2025-05-06 17:17:49 +02:00
committed by GitHub
parent 97dd520c64
commit 80007f3afd
31 changed files with 809 additions and 95 deletions

View File

@@ -105,6 +105,8 @@ function createContextualWorkflowRunner<
preventReleaseEvents,
}
context.isCancelling = isCancel
const args = [
transactionOrIdOrIdempotencyKey,
input,
@@ -188,7 +190,7 @@ function createContextualWorkflowRunner<
__type: MedusaContextType as Context["__type"],
}
context.transactionId ??= ulid()
context.transactionId ??= "auto-" + ulid()
context.eventGroupId ??= ulid()
return await originalExecution(