shigoto_dashboard (shigoto v1.9.10)

View Source

Dashboard queries for Shigoto. Provides statistics and search functions for building admin UIs, monitoring dashboards, and Nova Liveboard pages.

Queue Statistics

shigoto_dashboard:queue_stats() ->
    [#{queue => <<\"default\">>, available => 42, executing => 5,
       retryable => 2, completed => 1000, discarded => 3}]
shigoto_dashboard:search_jobs(#{worker => my_worker, state => failed, limit => 20})

Summary

Functions

Get batch statistics.

Get global job counts by state.

Get per-queue job counts grouped by state.

Get the most recent failed jobs.

Search jobs with filters. Supports: worker, queue, state, tags, limit, offset.

Get jobs stuck in executing state (potential zombies).

Get per-worker job counts and average execution stats.

Functions

batch_stats()

-spec batch_stats() -> {ok, [map()]} | {error, term()}.

Get batch statistics.

job_counts()

-spec job_counts() -> {ok, map()} | {error, term()}.

Get global job counts by state.

queue_stats()

-spec queue_stats() -> {ok, [map()]} | {error, term()}.

Get per-queue job counts grouped by state.

recent_failures(Limit)

-spec recent_failures(pos_integer()) -> {ok, [map()]} | {error, term()}.

Get the most recent failed jobs.

search_jobs(Filters)

-spec search_jobs(map()) -> {ok, [map()]} | {error, term()}.

Search jobs with filters. Supports: worker, queue, state, tags, limit, offset.

stale_jobs()

-spec stale_jobs() -> {ok, [map()]} | {error, term()}.

Get jobs stuck in executing state (potential zombies).

worker_stats()

-spec worker_stats() -> {ok, [map()]} | {error, term()}.

Get per-worker job counts and average execution stats.