Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.9 KB

QueueStats.md

File metadata and controls

35 lines (26 loc) · 1.9 KB

QueueStats

Live, per-queue backlog figures read from the store: what an operator watches to decide whether to add workers. Only non-terminal jobs are counted, so the query stays cheap on a large history table. Durable totals live in [StatsSnapshot] via JobStore::count_stats.

Properties

Name Type Description Notes
oldest_pending_age_secs int Seconds the oldest claimable job has been waiting, `None` when nothing is claimable. The queue's primary health signal: it grows when workers cannot keep up and stays near zero when they can. [optional]
paused bool Claims for this tenant's jobs on the queue are paused (see `POST /api/v1/queues/{queue}/pause`). Pending jobs accumulate; running ones finish. In the all-tenants view this is true only when every registered tenant of the queue is paused. [optional]
pending int Claimable now: `pending` or `retrying` with `scheduled_at` in the past.
queue str
running int Currently leased by a worker.
scheduled int Waiting for a future `scheduled_at` (a `run_at` job or a backoff retry).

Example

from queueflow.models.queue_stats import QueueStats

# TODO update the JSON string below
json = "{}"
# create an instance of QueueStats from a JSON string
queue_stats_instance = QueueStats.from_json(json)
# print the JSON string representation of the object
print(QueueStats.to_json())

# convert the object into a dict
queue_stats_dict = queue_stats_instance.to_dict()
# create an instance of QueueStats from a dict
queue_stats_from_dict = QueueStats.from_dict(queue_stats_dict)

[Back to Model list] [Back to API list] [Back to README]