“Replay/Retry jobs” & advanced search in Horizon (local/dev only) #57037
Unanswered
ZlatanOmerovic
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Horizon is central to our workflow. During development we often need to re-run the same job payload (successful/silenced/failed) to debug, profile, or iterate without re-triggering the app flow or crafting ad-hoc Artisan calls.
Problem
Today, re-executing a specific historical job (with its original payload) from Horizon requires manual work: re-hitting app endpoints, writing one-off seeders/commands, or copy-pasting JSON into
queue:push
. Similarly, finding jobs across queues/classes/IDs is slower than it could be—Horizon shows recent jobs but lacks focused filtering across queue name, job FQCN, and job UUID/ID.Proposal (two parts)
1) “Replay/Retry job” actions (local/dev only)
app()->environment('local', 'development')
or a Horizon config flag is set.Example config
Server-side guardrails:
HTTP endpoints (concept):
Acceptance criteria:
2) Search & filter across jobs
queue:payments
(by queue name)class:App\Jobs\ChargeCard
(by FQCN; support shortclass:ChargeCard
alias)id:UUID
(by job UUID)horizon:idx:queue:{name} -> jobIds
horizon:idx:class:{fqcn} -> jobIds
horizon:idx:status:{processed|failed|silenced|pending} -> jobIds
Acceptance criteria:
UX sketch (textual)
[ Replay ] [ Retry ]
(buttons), disabled when not in local/dev.queue:emails class:App\Jobs\SendMail since:-2h
Security & safety
APP_ENV
∈ {local
,development
} or enabled viaHORIZON_ENABLE_REPLAY
env.Alternatives considered
queue:push
,tinker
) – flexible but slower and error-prone.Why this fits Horizon
Happy to contribute a PR implementing the UI, routes, and minimal indices if maintainers agree on approach and naming.
Beta Was this translation helpful? Give feedback.
All reactions