bluecollar

Task state

The record of a task, and the services over it.

A TaskRun moves through nine statuses: planned, running, waiting_user_input, waiting_approval, blocked, interrupted, completed, failed and cancelled. taskstate.TaskRunStore, TaskStepStore and TaskArtifactStore are the interfaces the kernel needs. The shipped services keep everything in memory and write through to a repository set with UseRepository. A cancel can be registered against a running task so it arrives while the turn is running, and an interrupted run is resumed at most once.