Reputation: 51
I have a resque job to run. I tried queuing my job to a queue by issuing command:
Resque.enqueue("QUEUE", params)
It pushes the job to the queue. I tried running resque interface as localhost:3000/resque. It showed me pending jobs to be taken.. But it also shows that there are no worker running. I ran rake task to start the worker by command: (QUEUE='*' bundle exec rake resque:work
).
My redis instance is Resque.redis = #<Redis::Namespace:0x007f82183d0120 @namespace=:resque, @redis=#<Redis client v2.2.2 connected to redis://localhost:6379/0 (Redis v0.07)>>
.
I dont get any error as well when i try to run that rake task.. Please let me know if you need further information..
Upvotes: 4
Views: 2536
Reputation: 2572
This is old but hopefully, this might help whoever stumbles here.
If you use resque-lock
or resque-queue-lock
, your queue might be locked, and it might not be released because the process could've been killed before releasing the lock.
In our case, we find all the locks
Resque::Plugins::Queue::Lock.all_queue_locks
And find the one we need to remove and just delete the key from redis
Resque.redis.del(the_key_name)
the_key_name
above is the exact string you find the previous step.
Upvotes: 1