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
If for some reason (external and temporary) a job needs to be released, there could be a way (other than raising an Interrupt) to catch some exception and interpreting it as to release the job with specific options.
This should go with a way to distinguish in code whether it's executed by the worker or by passenger/whatever, as in the following example code
module AsyncMethods
def anything(*args)
do_something
rescue => some_controlled_situation
if defined(ASYNC_OBSERVER_WORKER)
raise AsyncObserver::Release :delay => 10
else
async_send_opts :anything, {:delay => 10}, args
end
end
end
The text was updated successfully, but these errors were encountered:
If for some reason (external and temporary) a job needs to be released, there could be a way (other than raising an
Interrupt
) to catch some exception and interpreting it as to release the job with specific options.This should go with a way to distinguish in code whether it's executed by the worker or by passenger/whatever, as in the following example code
The text was updated successfully, but these errors were encountered: