dhara/playground
PostgreSQL-backed task queue · live
connecting

Overview

Live state read from PostgreSQL and the running worker process.

—
Pending—queue depth
Running—claimed now
Completed—retained window
Dead—dead-lettered
Canceled—terminal
Workers—goroutines active
Completed / min—last 60 seconds
Reaped—stale recoveries

Controls

Every action creates real Dhara tasks. Nothing is simulated in the browser.

Burst jobs

PENDING → RUNNING

Enqueue echo jobs (2s each) and watch the worker pool claim them concurrently.

Flaky jobs

RETRY

Retrying jobs fail temporarily, then succeed. “Always fail” exhausts attempts and dead-letters.

Slow tasks

TIMEOUT

Run slow_task. The handler exceeds its deadline and is retried, then dead-lettered.

Worker pool

Dhara exposes process gauges and database leases, not per-worker heartbeats.

Configured—
Active—
Inflight—
Prefix—
Worker leaseCurrent taskAttemptLast heartbeat
No running task leases.

Idle worker identities are not synthesized. Rows appear only when PostgreSQL shows a real locked_by lease.

Recent tasks

Click any task to inspect its real state and, for your own tasks, payload and logs.

TaskTypeStateAttemptsWorkerNext runDurationCreated
Loading tasks…
— Polling pauses while this tab is hidden.

Prometheus metrics

Raw output from Dhara’s existing client and worker handlers.
expand
These are process-local counters, not fabricated series.

Client / queue gauges /metrics

Not loaded.

Worker execution /worker/metrics

Not loaded.

What you are watching

Claiming

Workers claim rows with SELECT … FOR UPDATE SKIP LOCKED. Each PENDING task is claimed by exactly one worker.

Retries

Failed attempts are recorded in PostgreSQL and rescheduled with exponential backoff plus full jitter. The attempt counter is incremented on claim.

Heartbeat vs timeout

A handler timeout is an ordinary handler error. The reaper only acts when a RUNNING task stops refreshing locked_at — for example after the worker process dies.

Dead letters

Once attempts are exhausted, Dhara writes a dead_letters row. Retrying a DEAD task resets attempts and returns it to the ready queue.