Skip to content

Commit 13a29a0

Browse files
committed
Clarify on_thread_error behaviour
1 parent 791f171 commit 13a29a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,13 @@ _Note_: The settings in this section should be set in your `config/application.r
214214
There are several settings that control how Solid Queue works that you can set as well:
215215
- `logger`: the logger you want Solid Queue to use. Defaults to the app logger.
216216
- `app_executor`: the [Rails executor](https://guides.rubyonrails.org/threading_and_code_execution.html#executor) used to wrap asynchronous operations, defaults to the app executor
217-
- `on_thread_error`: custom lambda/Proc to call when there's an error within a thread that takes the exception raised as argument. Defaults to
217+
- `on_thread_error`: custom lambda/Proc to call when there's an error within a Solid Queue thread that takes the exception raised as argument. Defaults to
218218

219219
```ruby
220220
-> (exception) { Rails.error.report(exception, handled: false) }
221221
```
222+
**This is not used for errors raised within a job execution**. Errors happening in jobs are handled by Active Job's `retry_on` or `discard_on`, and ultimately will result in [failed jobs](#failed-jobs-and-retries). This is for errors happening within Solid Queue itself.
223+
222224
- `use_skip_locked`: whether to use `FOR UPDATE SKIP LOCKED` when performing locking reads. This will be automatically detected in the future, and for now, you'd only need to set this to `false` if your database doesn't support it. For MySQL, that'd be versions < 8, and for PostgreSQL, versions < 9.5. If you use SQLite, this has no effect, as writes are sequential.
223225
- `process_heartbeat_interval`: the heartbeat interval that all processes will follow—defaults to 60 seconds.
224226
- `process_alive_threshold`: how long to wait until a process is considered dead after its last heartbeat—defaults to 5 minutes.

0 commit comments

Comments
 (0)