sidekiq-locking keeps only the first copy of a job in Redis while a short-lived lock is active. A duplicate enqueue for the same lock context (class, queue, args by default) is skipped until the original job succeeds or the lock_for TTL expires — whichever comes first. It is deliberately best-effort enqueue coalescing, not a correctness primitive or a runtime mutex: jobs must still be idempotent and protect true uniqueness with database constraints/locks where required. Opt a job in with `sidekiq_options lock_for: 5.minutes`; customize the dedup scope with a `lock_args` class method. No Rails or ActiveSupport required.
Required Ruby Version
>= 3.1
Authors
Vishnu M
Versions
- 0.1.0 September 17, 2026 (11 KB)