mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add worker
This commit is contained in:
parent
38949ee8fb
commit
4be63712f4
1 changed files with 10 additions and 0 deletions
10
lib/sidekiq/worker.rb
Normal file
10
lib/sidekiq/worker.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
module Sidekiq
|
||||
class Worker
|
||||
include Celluloid
|
||||
|
||||
def process(json)
|
||||
klass = json['class'].constantize
|
||||
klass.new.perform(*json['args'])
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue