Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active job with unique args doesn't work #120

Closed
knarewski opened this issue Oct 7, 2015 · 1 comment
Closed

Active job with unique args doesn't work #120

knarewski opened this issue Oct 7, 2015 · 1 comment

Comments

@knarewski
Copy link

Hello, the code snippet from readme does not seem to work:

Sidekiq.default_worker_options = {
   'unique' => true,
   'unique_args' => proc do |args|
     [args.first.except('job_id')]
   end
}
SidekiqUniqueJobs.config.unique_args_enabled = true

Short investigation showed, that during UniqueArgs initialization, on line:
@item['unique_args'.freeze] ||= unique_args(@item['args'.freeze])
The Proc is not executed, and gem just assumes that Proc object is an unique argument itself.

@mhenrixon
Copy link
Owner

Oh darn! I forgot about this, let me check what I can do..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants