Modules/Taskboard/server/statuses.py
Шурупов Илья Викторович e3f680288c Taskboard: add the daemon task status
A daemon task is a long-running background session (a watcher that polls
something and reports) rather than a one-shot job. The dispatcher never starts
it and never counts it against its worker slots, but a daemon whose session
ended without completing is reaped to blocked like wip. statuses.py now owns
that "live" set (LIVE_STATUSES) so the dispatcher no longer spells the status
list in SQL.

On the board the Daemon column sits between WIP and Review, has its own accent
colour, and is hidden by default like Backlog and Blocked: it only matters for
the few watcher tasks and can be shown from the column menu.
2026-10-26 21:02:54 +03:00

13 lines
585 B
Python

"""Task statuses. The dispatcher starts 'queued' tasks whose dependencies are done; an agent that cannot finish
marks its task 'blocked'. 'daemon' marks a task whose session is a long-running background watcher instead of a
one-shot job: the dispatcher never starts one and never counts it against its worker slots."""
STATUSES = ("backlog", "queued", "wip", "daemon", "review", "done", "blocked")
LIVE_STATUSES = ("wip", "daemon")
RENAMED_STATUSES = {"running": "wip", "ready": "queued", "failed": "blocked"}
def current_status(name):
return RENAMED_STATUSES.get(name, name)