Skip to content

Commit

Permalink
Specify source of SolidQueue to ErrorReporter
Browse files Browse the repository at this point in the history
Currently, the default value `application.active_support` is applied for source.
This does not identify it as an exception raised inside SolidQueue.

> source: a String about the source of the error. The default source is "application". Errors reported by internal libraries may set other sources; the Redis cache library may use "redis_cache_store.active_support", for instance. Your subscriber can use the source to ignore errors you aren't interested in.

This is a quote from the [rails guide](https://github.com/rails/rails/blob/v8.0.0/guides/source/error_reporting.md?plain=1#L216-L220).

Follow this guide to specify the source so that it can be determined that the error originated from inside SolidQueue.

Fixes #446
  • Loading branch information
tmimura39 authored and rosa committed Dec 9, 2024
1 parent 26f84a9 commit 979dac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/solid_queue/app_executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module SolidQueue
module AppExecutor
def wrap_in_app_executor(&block)
if SolidQueue.app_executor
SolidQueue.app_executor.wrap(&block)
SolidQueue.app_executor.wrap(source: "application.solid_queue", &block)
else
yield
end
Expand Down

0 comments on commit 979dac1

Please sign in to comment.