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

If a job is deleted from the enqueued list, it's still unique and new jobs can't be added. #74

Closed
tokenvolt opened this issue Jan 23, 2015 · 8 comments

Comments

@tokenvolt
Copy link

For example I have a job:

class TestJob
  include Sidekiq::Worker

  sidekiq_options queue: 'high',
                  unique: true,
                  unique_args: ->(args) { [ args.first ] }

  def perform(arg)
    # do something
  end
end

And calling it:

[1] pry(main)> TestJob.perform_async 1
=> "de5ff32394dbcdab2128d5ee"

Then if I go to sidekiq web interface and delete it from the enqueued list before it processed, I can't add a new one with the same argument.

[2] pry(main)> TestJob.perform_async 1
=> nil

I'm pretty sure this is not an expected behaviour. Am I right?

@sevaorlov
Copy link

I faced the same problem

@smee-dee
Copy link

smee-dee commented Feb 6, 2015

Same here

@maxim198307
Copy link

any updates on this pls? Have an issue while testing the worker - cant start unique worker second time even if the first one is removed from queue...perhaps this issue is connected to this

@mhenrixon
Copy link
Owner

Interesting, I wonder if it has to do with the arguments. I'll write some test cases

@tokenvolt
Copy link
Author

I explored this a little bit and it appears that lock is not cleared after deleting from web UI, because obviously it does not run any middewares, like it does after finishing the job or if the job is failed.

@crberube
Copy link

crberube commented May 4, 2015

Isn't this what sidekiq_unique_ext.rb is supposed to handle? I noticed that the file isn't required anywhere except for its spec. Not sure why that is.

@mhenrixon
Copy link
Owner

So we obviously need to require the file when sidekiq/api is required or sidekiq/web for that matter. If anyone have any knowledge in how to extend sidekiq functionality somehow now is the time to tell :)

@mhenrixon
Copy link
Owner

This has been closed for a while.

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

6 participants