Laravel queues without the foot-guns
Retries, idempotency and the failure modes that only show up in production.
Queues make an app feel fast, and they make failures quiet. Both are good reasons to be deliberate.
Make every job safe to run twice
Retries mean a job can run more than once. Design for it: use unique keys, check state before you act, and prefer "set to" over "add one to".
Decide what a failure means
Set tries, backoff and failed() on purpose. A payment job should fail loudly; a thumbnail job can retry quietly.
Watch the queue, not just the code
Track queue depth and the age of the oldest job. A growing backlog is the first sign something is wrong.
Comments 0
No comments yet — be the first.