Module: Sidekiq::ScheduledSet::UniqueExtension Private

Included in:
Sidekiq::ScheduledSet
Defined in:
lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Provides extensions for unlocking jobs that are removed and deleted

Author:

Instance Method Summary collapse

Instance Method Details

#delete(score, job_id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Wraps the original method to ensure locks for the job are deleted

Parameters:

  • score (Integer, Float)

    the score in the scheduled set

  • job_id (String)

    the Sidekiq JID



61
62
63
64
65
# File 'lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb', line 61

def delete(score, job_id)
  entry = find_job(job_id)
  SidekiqUniqueJobs::Unlockable.delete!(entry.item) if super(score, job_id)
  entry
end