DeviceJob lifecycle

DeviceJob lifecycle A lifecycle diagram generated by Archify. 01 / Job phases 02 / Waiting on time or a person 03 / Stopped QUEUED · waiting for an agent · Job phases · lease queue 01 QUEUED waiting for an agent lease queue LEASED · device reserved · Job phases · fencing token 02 LEASED device reserved fencing token RUNNING · scenario executing · Job phases · reporting steps 03 RUNNING scenario executing reporting steps SUCCEEDED · post published · Job phases · immutable 04 SUCCEEDED post published immutable NEEDS_ATTENTION · a person must act · Waiting on time or a person · device parked NEEDS_ATTENTION a person must act device parked RETRY_SCHEDULED · backing off · Waiting on time or a person · 1m · 2m · 4m RETRY_SCHEDULED backing off 1m · 2m · 4m FAILED · attempts exhausted · Stopped · operator can retry FAILED attempts exhausted operator can retry CANCELLED · operator stopped it · Stopped · immutable CANCELLED operator stopped it immutable agent leases; device reserved first step reported succeed challenge or auth required retryable failure after backoff attempts exhausted operator cancels Legend start active state waiting terminal success failure / exit

The lease is a fencing token

  • • Only the current holder may report on a job
  • • The device is reserved by a conditional write before LEASED
  • • A late report from a lost lease is refused with 412

Waiting is not failing

  • • RETRY_SCHEDULED backs off and re-enters the queue itself
  • • NEEDS_ATTENTION parks the device and names the required action
  • • An operator can force either straight back to QUEUED

Nothing is stuck

  • • An expired lease is reclaimed and the device released
  • • A job nobody picks up becomes EXPIRED after 24 hours
  • • SUCCEEDED and CANCELLED can never change again