12 lines
443 B
Bash
Executable File
12 lines
443 B
Bash
Executable File
#!/bin/bash
|
|
# wq_my_queue — list dispatched items for a given agent (what Steve polls)
|
|
|
|
API_URL="${WORK_QUEUE_API_URL:-}"
|
|
[[ -z "$API_URL" ]] && API_URL=$(cat ~/.config/work_queue_api_url 2>/dev/null || echo "")
|
|
[[ -z "$API_URL" ]] && { echo "Error: WORK_QUEUE_API_URL not set" >&2; exit 1; }
|
|
|
|
agent="$1"
|
|
[[ -z "$agent" ]] && { echo "Usage: wq my-queue <agent>" >&2; exit 1; }
|
|
|
|
curl -sf "$API_URL/work?status=dispatched&agent=$agent" | jq .
|