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

resque loner thinks job is queued when queue is empty #41

Open
michaelglass opened this issue Aug 27, 2014 · 2 comments
Open

resque loner thinks job is queued when queue is empty #41

michaelglass opened this issue Aug 27, 2014 · 2 comments

Comments

@michaelglass
Copy link

I'm using

gem 'resque-retry', git: 'https://github.com/lantins/resque-retry.git', ref: '9314b34d543bc87668fd6107148fd1c8dd7d61a2'
gem 'resque-pool'
gem 'resque-multi-job-forks'

if I check for a job that's already been queued, but completed, it says that it's already enqueued.

halp!

@ejfinneran
Copy link

Ran into the same issue. Any quick fix for this?

@ejfinneran
Copy link

The issue we ran into was I nuked the whole queue so all the lock keys where still around. The fix was:

key = 'resque:loners:queue:queue_name:job'
user_ids.map {|id| $redis.del(key + ":" + UserJob.redis_key(:class => 'UserJob', :args => [id]))}

We also started setting a TTL so that it will clean itself up after a number of hours:
https://github.com/resque/resque-loner/blob/master/lib/resque-loner/unique_job.rb#L36-L48

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