Module: SidekiqUniqueJobs::Job
Overview
Utility class to append uniqueness to the sidekiq job hash
Instance Method Summary collapse
-
#add_digest(item) ⇒ Hash
Adds lock_args, lock_prefix and lock_digest to the sidekiq job hash.
-
#prepare(item) ⇒ Hash
Adds lock, timeout, expiration, lock_args, lock_prefix, and lock_digest to the sidekiq job hash.
Instance Method Details
#add_digest(item) ⇒ Hash
Adds lock_args, lock_prefix and lock_digest to the sidekiq job hash
22 23 24 25 26 27 28 |
# File 'lib/sidekiq_unique_jobs/job.rb', line 22 def add_digest(item) add_lock_prefix(item) add_lock_args(item) add_lock_digest(item) item end |
#prepare(item) ⇒ Hash
Adds lock, timeout, expiration, lock_args, lock_prefix, and lock_digest to the sidekiq job hash
12 13 14 15 16 17 18 |
# File 'lib/sidekiq_unique_jobs/job.rb', line 12 def prepare(item) stringify_on_conflict_hash(item) add_lock_type(item) add_lock_timeout(item) add_lock_ttl(item) add_digest(item) end |