diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-05-08 16:29:04 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-05-08 16:29:04 +0200 |
commit | 0b305bfe1a46b43f4954e5e692a8d7b905cd72d4 (patch) | |
tree | c4e5609a849df8e1c22b58da4bb0a4f1f61765b3 | |
parent | ce962812cd52e484c375ccfb5e1c8fb28dccf218 (diff) | |
parent | e744cfee65c8efae19ec814a82895df2b3ff96b7 (diff) | |
download | rails-0b305bfe1a46b43f4954e5e692a8d7b905cd72d4.tar.gz rails-0b305bfe1a46b43f4954e5e692a8d7b905cd72d4.tar.bz2 rails-0b305bfe1a46b43f4954e5e692a8d7b905cd72d4.zip |
Merge pull request #20072 from vngrs/refactor_active_job_sidekiq_adapter
Refactor sidekiq adapter enqueue and enqueue_at methods
-rw-r--r-- | activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb b/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb index 7a2dd3e9fc..c321776bf5 100644 --- a/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb @@ -17,24 +17,20 @@ module ActiveJob class SidekiqAdapter def enqueue(job) #:nodoc: #Sidekiq::Client does not support symbols as keys - sidekiq_job_id = Sidekiq::Client.push \ + job.provider_job_id = Sidekiq::Client.push \ 'class' => JobWrapper, 'wrapped' => job.class.to_s, 'queue' => job.queue_name, 'args' => [ job.serialize ] - job.provider_job_id = sidekiq_job_id - sidekiq_job_id end def enqueue_at(job, timestamp) #:nodoc: - sidekiq_job_id = Sidekiq::Client.push \ + job.provider_job_id = Sidekiq::Client.push \ 'class' => JobWrapper, 'wrapped' => job.class.to_s, 'queue' => job.queue_name, 'args' => [ job.serialize ], 'at' => timestamp - job.provider_job_id = sidekiq_job_id - sidekiq_job_id end class JobWrapper #:nodoc: |