Database queries for worker-related data.
Summary
Functions
Counts workers matching the given filters.
Gets the adjacent worker (next or previous by last_heartbeat_at).
Gets a single worker with details.
Lists tasks processed by a specific worker.
Lists workers with load information.
Functions
Counts workers matching the given filters.
Options
:flow_slug- Filter by flow slug:health_status- Filter by health (healthy, stale, dead)
@spec get_adjacent_worker(module(), String.t(), :next | :prev) :: {:ok, String.t()} | {:error, :not_found}
Gets the adjacent worker (next or previous by last_heartbeat_at).
Direction can be :next or :prev. Returns {:ok, worker_id} or {:error, :not_found}.
Gets a single worker with details.
Lists tasks processed by a specific worker.
Lists workers with load information.
Options
:flow_slug- Filter by flow slug:health_status- Filter by health (healthy, stale, dead):limit- Maximum number of workers to return:cursor- Worker ID to start after for pagination