Skip to content

Commit 40c81df

Browse files
docs(dgw): add the provisioner task intent
1 parent c72e5ef commit 40c81df

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎crates/provisioner-task/INTENT.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Background
2+
Provisioner tasks are tasks that are assigned to the Gateway.
3+
4+
5+
# Invariants
6+
Each provisioner task will have a task id.
7+
Each provisioner task will have the following state:
8+
- Queued
9+
- Running {task specific payload}
10+
- Succeeded {task specific payload}
11+
- Failed {task specific payload}
12+
The state transitions are as follows:
13+
- Queued -> Running {task specific payload}
14+
- Running {task specific payload} -> Succeeded {task specific payload}
15+
- Running {task specific payload} -> Failed {task specific payload}
16+
- Running {task specific payload} -> Running {task specific payload} (update task specific payload)
17+
- Queued -> Failed {task specific payload}
18+
19+
Tasks will have a deadline which is relative to the time it is received by the Gateway.
20+
21+
# Footnote
22+
Provisioner tasks and jobs are not the same thing. Task has its own state, the job queue is merely for scheduling and retrying.
23+

0 commit comments

Comments
 (0)