lib/sidekiq-status/worker.rb in sidekiq-status-0.6.0 vs lib/sidekiq-status/worker.rb in sidekiq-status-0.7.0
- old
+ new
@@ -9,17 +9,17 @@
# Stores multiple values into a job's status hash,
# sets last update time
# @param [Hash] status_updates updated values
# @return [String] Redis operation status code
def store(hash)
- store_for_id @jid, hash, @expiration
+ store_for_id @provider_job_id || @job_id || @jid, hash, @expiration
end
# Read value from job status hash
# @param String|Symbol hask key
# @return [String]
def retrieve(name)
- read_field_for_id @jid, name
+ read_field_for_id @provider_job_id || @job_id || @jid, name
end
# Sets current task progress
# (inspired by resque-status)
# @param Fixnum number of tasks done