Background
BackgroundJobs runs jobs but provides no operator UI. There is no way to inspect queue depth, throughput, failed-job payloads, or to retry/delete jobs without poking the DB. Laravel Horizon is the equivalent for Redis-queues.
Motivation
- Ops needs visibility into the queue without SSH+SQL
- Failed-job triage (view exception, edit payload, retry)
- Capacity planning (throughput per queue, per job-type)
Design sketch
Add an Inertia UI section under Admin (/admin/jobs) — not a separate module since it leans on BackgroundJobs:
Pages:
- Overview: queues, depth, throughput last 5 min / 1 h / 24 h, success vs failure rate
- Pending: list of queued jobs with payload preview, scheduled-at
- Running: in-flight jobs + duration
- Failed: stack trace, payload, last-attempt-at; actions: retry / retry-all / delete
- Completed: rolling 24 h window
- Recurring: scheduled-job definitions (depends on the Scheduler issue)
Backend:
- New
IJobMetrics service with RecordEnqueued/Started/Completed/Failed hooks called by the runner
- Metrics persisted as 1-minute buckets per (queue, job-type, outcome) for cheap chart aggregation
- Failed jobs already persisted; add
RetryAsync(jobId) API
- Auth:
Jobs.View and Jobs.Manage permissions
Acceptance criteria
References
Background
BackgroundJobsruns jobs but provides no operator UI. There is no way to inspect queue depth, throughput, failed-job payloads, or to retry/delete jobs without poking the DB. Laravel Horizon is the equivalent for Redis-queues.Motivation
Design sketch
Add an Inertia UI section under Admin (
/admin/jobs) — not a separate module since it leans onBackgroundJobs:Pages:
Backend:
IJobMetricsservice withRecordEnqueued/Started/Completed/Failedhooks called by the runnerRetryAsync(jobId)APIJobs.ViewandJobs.ManagepermissionsAcceptance criteria
IJobMetrics+ bucket persistence/admin/jobs/overviewReferences
modules/BackgroundJobs