Skip to content

Commit

Permalink
Shuttlerock-rails5 Add Rails 4 compatibility. See
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Cantero committed Jan 25, 2016
1 parent 6635277 commit 9875f71
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/shoryuken/extensions/active_job_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ module QueueAdapters
#
# Rails.application.config.active_job.queue_adapter = :shoryuken
class ShoryukenAdapter
class << self
def instance
# https://github.com/phstc/shoryuken/pull/174#issuecomment-174555657
@instance ||= new
end

def enqueue(job)
instance.enqueue(job)
end

def enqueue_at(job, timestamp)
instance.enqueue(job, timestamp)
end
end

def enqueue(job) #:nodoc:
register_worker!(job)

Expand Down

0 comments on commit 9875f71

Please sign in to comment.