简体   繁体   中英

Resque: worker status is not right

Resque is currently showing me that I have a worker doing work on a queue. That worker was shutdown by me in the middle of the queue (it's just for testing) and the worker is still showing as running. I've confirmed the process ID has been killed and bluepill is no longer monitoring it. I can't find anyway in the UI to force clear that it is working.

What's the best way to update the status for the # of workers that are currently up (I have 2, web UI reports 3).

You may have a lingering pid file. This file is independent of the process running; in other words, when you killed the process, it didn't delete the pid file.

If you're using a typical Rails and Resque setup, Resque will store the pid in the Rails ./tmp directory.

Some Resque start scripts specify the pid file in a different location, something like this:

PIDFILE=foo/bar/resque/pid bundle exec rake resque:work 

Wherever the script puts the pid file, look there, then delete it, then restart.

Also on the command line, you can ask redis for the running workers:

redis-cli keys *worker:*

If there are workers that you don't expect, you can delete them with:

redis-cli del <keyname>

尝试重新启动应用程序。

供将来参考:也可以查看https://github.com/resque/resque/issues/299

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM