File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,9 +414,9 @@ When a worker claims a task it also writes a lease with an expiry timestamp (30s
414414
415415| Situation | Verdict | Why |
416416| --- | --- | --- |
417- | Attempts remain | back to ` FAILED ` with ` scheduled_at = now() ` | Another worker can claim it immediately |
418- | Attempts are spent | ` DEAD ` | A task that reliably kills whatever worker claims it must not cycle forever |
419- | Its run has meanwhile stopped | ` CANCELLED ` | Requeuing would resume a cancelled run |
417+ | Its run has meanwhile stopped (checked first) | ` CANCELLED ` | Requeuing would resume a cancelled run |
418+ | The run is live and attempts remain | back to ` FAILED ` with ` scheduled_at = now() ` | Another worker can claim it immediately |
419+ | The run is live and attempts are spent | ` DEAD ` | A task that reliably kills whatever worker claims it must not cycle forever |
420420
421421This is how a run resumes after a worker dies mid-task.
422422
@@ -466,6 +466,7 @@ erDiagram
466466 timestamptz scheduled_at "when it becomes claimable"
467467 }
468468 dependencies {
469+ uuid run_id FK
469470 uuid upstream_task_id FK
470471 uuid downstream_task_id FK
471472 }
@@ -475,9 +476,11 @@ erDiagram
475476 timestamptz expires_at
476477 }
477478 task_logs {
479+ bigserial id PK
478480 uuid task_id FK
479481 int attempt
480- text line
482+ text level "info or error"
483+ text message
481484 }
482485```
483486
You can’t perform that action at this time.
0 commit comments