Skip to main content
Live. This area is documented as current, user-reliable behavior.

Goal

Avoid the most common reliability mistakes.

Prerequisites

  • A Durable Jobs flow in progress

Workflow

1
Use idempotency keys for every externally triggered job.
2
Keep job handlers idempotent.
3
Break workflows into named steps.
4
Use correlation keys that identify the exact resource waiting for an event.
5
Avoid long blocking work that should be an event wait or separate step.

Production checklist

  • Use idempotency keys for API requests, webhooks, payments, signups, imports, and provisioning.
  • Keep jobs idempotent even when StackShift is retrying for you.
  • Wrap side effects in step.run with stable step names.
  • Use correlation keys like user:user_123, order:order_123, or payment:pay_123.
  • Use waitForEvent for external waiting instead of sleeping or polling inside a running process.
  • Set explicit timeout behavior for waits.
  • Use state for progress, counters, temporary markers, and locks.
  • Watch the timeline before retrying manually.

Expected result

Your jobs are safer to retry, easier to observe, and easier to resume.