From 4be63712f47f74daccc81a4dc20422ca65391959 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Mon, 16 Jan 2012 20:05:38 -0800 Subject: [PATCH] Add worker --- lib/sidekiq/worker.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/sidekiq/worker.rb diff --git a/lib/sidekiq/worker.rb b/lib/sidekiq/worker.rb new file mode 100644 index 00000000..08e3adf7 --- /dev/null +++ b/lib/sidekiq/worker.rb @@ -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