Queues

Get a real-time snapshot of the AVA job queue — how many jobs are waiting, which are running, and which workers are under load.

Queue snapshot

bash
GET /v1/ava/queues
json
{
  "data": {
    "total_queued": 12,
    "total_running": 3,
    "by_worker": [
      {
        "worker_id": "wkr_01hxyz",
        "queued": 8,
        "running": 2,
        "high_priority": 3
      },
      {
        "worker_id": "wkr_02hxyz",
        "queued": 4,
        "running": 1,
        "high_priority": 0
      }
    ],
    "sampled_at": "2025-06-01T10:00:00Z"
  }
}

Priority levels

bash
1-3  → high priority   (processed first)
4-6  → normal priority (default: 5)
7-10 → low priority    (background work)
Tip:Use the queue snapshot on your ops dashboard to detect backlogs before they affect SLAs. A growing total_queued with total_running at max capacity indicates a worker needs horizontal scaling — contact HLD support to increase concurrency limits for your tenant.

Reducing queue depth

If a worker is building a backlog:

bash
# Cancel low-priority jobs to reduce depth
curl -X POST https://api.hldgroup.org/v1/ava/jobs/job_01hxyz/cancel \
  -H "x-internal-secret: <key>" \
  -H "x-tenant-id: ten_01hxyz" \
  -H "x-user-id: usr_01hxyz" \
  -H "x-platform-role: tenant-system-admin"