You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timeouts in Ruby are rather dangerous so this should be given some thought as it's probably unavoidable to entirely avoid the risk of corruption of shared state.
I think the biggest danger around an ActiveJob is corrupting the ActiveRecord database pool. So adding a timeout solely around the ActiveJob code, but within the executor wrap might work. Even better would be running it within an ActiveJob around hook so that it could potentially be caught by ActiveJob's rescue_from/retry_on handlers.
The text was updated successfully, but these errors were encountered:
Killing threads is not something actually supported by Concurrent Ruby because of the difficulty in doing it safely with user code. Added instructions for configuring timeouts in user code: #39
Timeouts in Ruby are rather dangerous so this should be given some thought as it's probably unavoidable to entirely avoid the risk of corruption of shared state.
Concurrent Ruby has
Cancellations
but it seems impossible to safely cancel a uncontrolled code (e.g. active job): http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Cancellation.htmlI think the biggest danger around an ActiveJob is corrupting the ActiveRecord database pool. So adding a timeout solely around the ActiveJob code, but within the executor wrap might work. Even better would be running it within an ActiveJob
around
hook so that it could potentially be caught by ActiveJob'srescue_from
/retry_on
handlers.The text was updated successfully, but these errors were encountered: