resque-loner
resque-loner copied to clipboard
resque loner thinks job is queued when queue is empty
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!
Ran into the same issue. Any quick fix for this?
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