form26/sidekiq-unique-jobs — pull request #16 by lsimoneau (2013-06-01 12:00:06+00:00)
Title: Compatibility with Sidekiq 2.12.1 Scheduled Jobs

Sidekiq 2.12.1 now calls middleware when queueing scheduled jobs. This causes issues with unique-jobs: a key is stored when the job is initially scheduled, then when the job is removed from the schedule and queued, unique-jobs stops it because they key is present.

This works around the problem by storing a different value (2) in the job hash for jobs that are being scheduled. When a new job is being processed, if it was previously scheduled but is now being queued, we let it through.