List every worker/client connected

35 views
Skip to first unread message

Bruno

unread,
Apr 23, 2012, 10:04:31 AM4/23/12
to beanstalk-talk
Hello,

I wish I had a simple solution just to list the active clients
connected to the beanstalked server.
No need for an extensive report, but just an identifier and their
status, or the last activity. This is a simple way to know what
workers are connected and if they're still active, or if they crashed.
The ideal method would be to provide a string identifier at connect,
that would be returner when listing clients, for example:
"w165" : "reserving"
"w44" : "connected"
"w48" : "reserving"

Any way to do that without having the workers update a database entry
every X seconds?
Thanks !

Keith Rarick

unread,
Apr 24, 2012, 1:45:39 AM4/24/12
to beansta...@googlegroups.com
On Mon, Apr 23, 2012 at 7:04 AM, Bruno <bruno...@gmail.com> wrote:
> The ideal method would be to provide a string identifier at connect,
> that would be returner when listing clients, for example:

It's hard to justify adding a special-case feature for this.

You can work around it by having each worker listen on
a specially-named tube, for example "w165" or "w44", then
running list-tubes and looking for tube names that match
the format. Calling stats-tube will tell you whether that
worker is currently waiting.

kr

Reply all
Reply to author
Forward
0 new messages