Skip to content

Commit

Permalink
Attempt to fix CI
Browse files Browse the repository at this point in the history
ActiveJob::QueueAdapters::AbstractAdapter was only introduced in Rails 7.2.0 so let's retain compatability with older Rails versions by not referencing it
  • Loading branch information
jpawlyn committed Jan 21, 2025
1 parent 96aa490 commit e2fb182
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/shoryuken/extensions/active_job_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module QueueAdapters
# To use Shoryuken set the queue_adapter config to +:shoryuken+.
#
# Rails.application.config.active_job.queue_adapter = :shoryuken
class ShoryukenAdapter < ActiveJob::QueueAdapters::AbstractAdapter
class ShoryukenAdapter
class << self
def instance
# https://github.com/phstc/shoryuken/pull/174#issuecomment-174555657
Expand All @@ -30,6 +30,11 @@ def enqueue_at(job, timestamp)
end
end

# only required for Rails 7.2.x
def enqueue_after_transaction_commit?
true
end

def enqueue(job, options = {}) #:nodoc:
register_worker!(job)

Expand Down

0 comments on commit e2fb182

Please sign in to comment.