michelsalib / BCCResqueBundle

The BCC resque bundle provides integration of php-resque to Symfony2. It is inspired from resque, a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.
122 stars 91 forks source link

Removing non responsive workers #123

Closed vamsiikrishna closed 9 years ago

vamsiikrishna commented 9 years ago

HI , We are stuck with some workers which we are not able to stop using the command ..they still appear in the web UI provided . whats the recommended way to directly remove it from redis ?

Thanks

danhunsaker commented 9 years ago

Are the workers themselves still running anywhere? Starting a new worker will clear the workers list of any workers from the same system (determined by hostname) that aren't still in the system process list (that is, whose pid isn't associated with a running process). So if the workers themselves are still running (even if they're frozen/locked up/etc), you'll want to kill them from the CLI. Then simply start a new worker, and it should clean out the list.

On the other hand, if the workers are associated to a hostname that isn't available any more, you have to use redis-cli to clear them out. The worker list is a set named resque:workers, so use Redis's set-related commands to clear out the offenders manually.

vamsiikrishna commented 9 years ago

Hi thanks for the reply, I was able to sucessfully remove the workers from the old machine..

SMEMBERS resque:workers
SREM resque:workers "NAME OF WORKER"
danhunsaker commented 9 years ago

Glad to help. If you could close this issue, that would be awesome. :-)