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
This commit also introduced ActiveJob::QueueAdapters::AbstractAdapter which all rails queues now inherit from.
In the future, the best path would be to have the adapter inherit from AbstractAdapter, to avoid new methods breaking job enqueuing.
At this time, however, its default behaviour could simply be implemented.
The text was updated successfully, but these errors were encountered:
tostart-pickagreatname
changed the title
Rails 7.2.1 requires enqueue_after_transaction_commit? method on queue adapters
Rails 7.2.1 breaks enqueuing without enqueue_after_transaction_commit? method on queue adapters
Aug 29, 2024
tostart-pickagreatname
changed the title
Rails 7.2.1 breaks enqueuing without enqueue_after_transaction_commit? method on queue adapters
Rails 7.2.X breaks enqueuing without enqueue_after_transaction_commit? method on queue adapters
Sep 3, 2024
A workaround for whoever ran into this issue with Rails 7.2 and Que 2.4—put this in your app/jobs/application_job.rb.
classApplicationJob < ActiveJob::Base# Automatically retry jobs that encountered a deadlock# retry_on ActiveRecord::Deadlocked# Most jobs are safe to ignore if the underlying records are no longer available# discard_on ActiveJob::DeserializationError# Wait for the transaction to commit before enqueuingself.enqueue_after_transaction_commit=:alwaysend
Rails 7.2.1 requires that queues implement the
enqueue_after_transaction_commit?
method.The impact of not having this method and upgrading to
7.2.1
is that all job enqueuing fails.This method is described in rails/rails@e922c59
This commit also introduced
ActiveJob::QueueAdapters::AbstractAdapter
which all rails queues now inherit from.In the future, the best path would be to have the adapter inherit from
AbstractAdapter
, to avoid new methods breaking job enqueuing.At this time, however, its default behaviour could simply be implemented.
The text was updated successfully, but these errors were encountered: