blob: b7e963cd6fef2d447a954c4286e200109db7a8ff (
plain) (
tree)
|
|
require 'backburner'
module ActiveJob
module QueueAdapters
class BackburnerAdapter
class << self
def enqueue(job, *args)
Backburner::Worker.enqueue JobWrapper, [ job.name, *args ], queue: job.queue_name
end
def enqueue_at(job, timestamp, *args)
raise NotImplementedError
end
end
class JobWrapper
class << self
def perform(job_name, *args)
job_name.constantize.new.perform_with_hooks *args
end
end
end
end
end
end
|