Class: SidekiqRobustJob::DigestGenerator
- Inherits:
-
Object
- Object
- SidekiqRobustJob::DigestGenerator
- Defined in:
- lib/sidekiq_robust_job/digest_generator.rb
Instance Method Summary collapse
- #generate(job_class, *arguments) ⇒ Object
-
#initialize(backend:) ⇒ DigestGenerator
constructor
A new instance of DigestGenerator.
Constructor Details
#initialize(backend:) ⇒ DigestGenerator
Returns a new instance of DigestGenerator.
6 7 8 |
# File 'lib/sidekiq_robust_job/digest_generator.rb', line 6 def initialize(backend:) @backend = backend end |
Instance Method Details
#generate(job_class, *arguments) ⇒ Object
10 11 12 |
# File 'lib/sidekiq_robust_job/digest_generator.rb', line 10 def generate(job_class, *arguments) backend.hexdigest("#{job_class}-#{Array(arguments).join('-')}") end |