aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/Rakefile
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-09-25 00:54:05 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-09-25 01:34:20 +0300
commitb0f2f5e348a409d52f126c446951fa4397a56302 (patch)
tree4fce4c8d8f09f8344ec5b514e1a8b4c54be7efe0 /activesupport/Rakefile
parent06274428e534f8e12fc7d6904a89678b23c5b404 (diff)
downloadrails-b0f2f5e348a409d52f126c446951fa4397a56302.tar.gz
rails-b0f2f5e348a409d52f126c446951fa4397a56302.tar.bz2
rails-b0f2f5e348a409d52f126c446951fa4397a56302.zip
Improve `enqueue_retry.active_job` message
Since #33751 was added `enqueue_retry.active_job` instrumentation to the `retry_on` method, then #33897 moved the instrumentation to `retry_job` method in order to ensure that this method publish `enqueue_retry.active_job` notification too. See related discussion https://github.com/rails/rails/pull/33751#discussion_r214140008 Since `enqueue_retry.active_job` moved to `retry_job`, there is no guarantee that payload of `enqueue_retry.active_job` would have `:error`. See test `LoggingTest#test_enqueue_retry_logging_on_retry_job` as example of that case. Related to https://github.com/rails/rails/pull/33897#discussion_r219707024 I think we can improve notification of `enqueue_retry.active_job`: - If there is no `event.payload[:error]`, then publish like "Retrying RescueJob in 3 seconds." only. - If `event.payload[:wait]` is `nil`, then publish "Retrying RescueJob in 0 seconds." instead of "Retrying RescueJob in nil seconds." - If there is `event.payload[:error]`, then publish "Retrying RescueJob in 3 seconds, due to a DefaultsError.". - Change the type of the message from `error` to `info.` Also, this commit removes part of messages - "The original exception was #{ex.cause.inspect}." of `enqueue_retry.active_job`, `retry_stopped.active_job`, and `discard.active_job` since I haven't found it useful. Please let me know whether you agree with that?
Diffstat (limited to 'activesupport/Rakefile')
0 files changed, 0 insertions, 0 deletions