Class: SyncMachine::EnsurePublication::Deduper
- Inherits:
-
Object
- Object
- SyncMachine::EnsurePublication::Deduper
- Defined in:
- lib/sync_machine/ensure_publication/deduper.rb
Overview
Ensures that the current job is not:
-
Currently being run by another worker
-
Rendered unnecessary by the fact another job with the same subject was completed since the time this job was requested.
Instance Method Summary collapse
- #dedupe ⇒ Object
-
#initialize(enqueue_time_str:, last_job_finished_at:, job_class:, subject_id:) ⇒ Deduper
constructor
A new instance of Deduper.
Constructor Details
#initialize(enqueue_time_str:, last_job_finished_at:, job_class:, subject_id:) ⇒ Deduper
Returns a new instance of Deduper.
8 9 10 11 12 13 |
# File 'lib/sync_machine/ensure_publication/deduper.rb', line 8 def initialize(enqueue_time_str:, last_job_finished_at:, job_class:, subject_id:) @enqueue_time_str = enqueue_time_str @job_class = job_class @last_job_finished_at = last_job_finished_at @subject_id = subject_id end |