New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return_false_on_aborted_enqueue setting not working #37030
Comments
This could be happening because your application is loading Active Job too early; the values in rails/activejob/lib/active_job/railtie.rb Lines 27 to 32 in 66cabed
You can confirm this by adding |
@eugeneius make sense, thanks. Looks like its not something I have any control over, the If anyone comes across this issue with the same problem, I solved it by adding this to my # config/initializers/new_framework_defaults_6_0.rb
# ... snip ...
# Return false instead of self when enqueuing is aborted from a callback.
Rails.application.config.active_job.return_false_on_aborted_enqueue = true
# The above setting seems to have no effect.
# https://github.com/rails/rails/issues/37030
ActiveJob::Base.return_false_on_aborted_enqueue = true
# ... snip ... Backtrace from
|
`cache_versioning` setting is not taking effect since it appears that govuk_notify_rails is causing early rails loading and causing it to be "lost". This is a workaround for issue rails/rails#39855 (comment) suggested by this issue comment rails/rails#37030 (comment)
NOTE: this setting is not currently taking effect since it appears that govuk_notify_rails is causing early rails loading and causing it to be "lost". This is a workaround for issue rails/rails#39855 (comment) suggested by this issue comment rails/rails#37030 (comment) and this activerecord specific issue rails/rails#27844
NOTE: this setting is not taking effect since it appears that govuk_notify_rails is causing early rails loading and causing it to be "lost". This is a workaround for issue rails/rails#39855 (comment) suggested by this issue comment rails/rails#37030 (comment)
NOTE: this setting is not taking effect since it appears that govuk_notify_rails is causing early rails loading and causing it to be "lost". This is a workaround for issue rails/rails#39855 (comment) suggested by this issue comment rails/rails#37030 (comment)
Steps to reproduce
I'm attempting to upgrade a 5.2 app to 6.0. I get about a million warnings during the spec suite:
Since, as far as I'm aware, we never rely on the return value of enqueuing a job, I uncommented the setting in
new_framework_defaults_6_0.rb
This did not make the warnings go away.
Expected behavior
No warnings after enabling
active_job.return_false_on_aborted_enqueue = true
Actual behavior
Tons of warnings.
It seems the Rails config setting isn't getting passed to the ActiveJob class variable:
System configuration
Rails version: 6.0
Ruby version: 2.6.3
The text was updated successfully, but these errors were encountered: