We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01d2f80 commit dd7a38eCopy full SHA for dd7a38e
lib/solid_queue/pool.rb
@@ -19,16 +19,16 @@ def post(execution)
19
available_threads.decrement
20
21
future = Concurrent::Future.new(args: [ execution ], executor: executor) do |thread_execution|
22
- begin
23
- wrap_in_app_executor do
24
- thread_execution.perform
25
- end
26
- rescue Exception
27
- nil
28
- ensure
29
- available_threads.increment
30
- mutex.synchronize { on_idle.try(:call) if idle? }
+ wrap_in_app_executor do
+ thread_execution.perform
31
end
+ ensure
+ available_threads.increment
+ mutex.synchronize { on_idle.try(:call) if idle? }
+ end
+
+ future.add_observer do |_, _, error|
+ handle_thread_error(error) if error
32
33
34
future.execute
0 commit comments