From b13a3cb29b7b8823a085977dc6de801fb65acf71 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 20 May 2014 17:37:10 +0200 Subject: Styling --- lib/active_job/queue_adapters/sidekiq_adapter.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/active_job/queue_adapters/sidekiq_adapter.rb b/lib/active_job/queue_adapters/sidekiq_adapter.rb index 0cf9e47287..43bd69790c 100644 --- a/lib/active_job/queue_adapters/sidekiq_adapter.rb +++ b/lib/active_job/queue_adapters/sidekiq_adapter.rb @@ -5,11 +5,11 @@ module ActiveJob class SidekiqAdapter class << self def queue(job, *args) - item = { 'class' => JobWrapper, - 'queue' => job.queue_name, - 'args' => [job, *args], - 'retry' => true } - Sidekiq::Client.push(item) + Sidekiq::Client.push \ + 'class' => JobWrapper, + 'queue' => job.queue_name, + 'args' => [ job, *args ], + 'retry' => true end end @@ -17,8 +17,7 @@ module ActiveJob include Sidekiq::Worker def perform(job_name, *args) - instance = job_name.constantize.new - instance.perform *Parameters.deserialize(args) + job_name.constantize.new.perform *Parameters.deserialize(args) end end end -- cgit v1.2.3