Worker Validation

Some settings are not compatible with each other and this has been a source of confusion to people. The documentation isn’t particularly good at highlighting this so I decided to provide a way to easily test your worker configuration.

Background

Before version seven it was impossible to get any context around the lock. Only the digest that was used for uniqueness was displayed and no other context was available. Needless to say, a random string isn’t enough information to provide a detailed bug report.

Usage

Lock info can be turned on either for a specific worker or globally

Global configuration

SidekiqUniqueJobs.configure do |config|
  config.lock_info = true
end

Worker configurtaion

class WorkerWithLockInfo
  include Sidkekiq::Worker

  sidekiq_options lock: :until_executed, lock_info: true
end
  1. Changelog
  2. Debugging of Lua scripts
  3. Detail about each lock
  4. Better extension to Sidekiq::Web
  5. Limiting of locks - allow a configurable number of simultaneous workers with the same unique lock
  6. Automatic cleanup of orphaned locks
  7. Worker validation - validates the sidekiq_options for unique configuration