Skip to content

Commit 4c6a74e

Browse files
committed
Add explanation about failed jobs
As requested in #66
1 parent 7838ad4 commit 4c6a74e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,20 @@ Note that the `duration` setting depends indirectly on the value for `concurrenc
197197

198198
Finally, failed jobs that are automatically or manually retried work in the same way as new jobs that get enqueued: they get in the queue for gaining the lock, and whenever they get it, they'll be run. It doesn't matter if they had gained the lock already in the past.
199199

200+
## Failed jobs and retries
201+
202+
Solid Queue doesn't include any automatic retry mechanism, it [relies on Active Job for this](https://edgeguides.rubyonrails.org/active_job_basics.html#retrying-or-discarding-failed-jobs). Jobs that fail will be kept in the system, and a _failed execution_ (a record in the `solid_queue_failed_executions` table) will be created for these. The job will stay there until manually discarded or re-enqueued. You can do this in a console as:
203+
```ruby
204+
failed_execution = SolidQueue::FailedExecution.find(...) # Find the failed execution related to your job
205+
failed_execution.error # inspect the error
206+
207+
failed_execution.retry # This will re-enqueue the job as if it was enqueued for the first time
208+
failed_execution.discard # This will delete the job from the system
209+
```
210+
211+
We're planning to release a dashboard called _Mission Control_, where, among other things, you'll be able to examine and retry/discard failed jobs, one by one, or in bulk.
212+
213+
200214
## Puma plugin
201215
We provide a Puma plugin if you want to run the Solid Queue's supervisor together with Puma and have Puma monitor and manage it. You just need to add
202216
```ruby

0 commit comments

Comments
 (0)