blob: 0db9cf144fa43b18302e95eeb30028de918a2cc9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
require 'resque'
require 'active_support/core_ext/enumerable'
require 'active_support/core_ext/array/access'
require 'active_support/core_ext/string/inflections'
module ActiveJob
module JobWrappers
class ResqueWrapper
class << self
def wrap(job, args)
[ new(job), *args.prepend(job) ]
end
def perform(job_name, *args)
job_name.constantize.perform(*args)
end
end
def initialize(job)
@queue = job.queue_name
end
def to_s
self.class.to_s
end
end
end
end
|