Queue Length

422 views
Skip to first unread message

Chris Were

unread,
Oct 19, 2009, 10:08:08 PM10/19/09
to gearman
Hi,

I'm using background tasks.

Is there anyway with gearman to find the length of a given queue?
Also, how do I find and set the maximum queue length?

Cheers,
Chris

Keith Kruepke

unread,
Oct 19, 2009, 10:48:31 PM10/19/09
to gea...@googlegroups.com, Chris Were
You can use the administrative protocol. I am not sure if you can see the maximum queue length for a function, but you are able to set it and view the number of jobs in each queue. (I do the latter all the time.) You can find details here in the second-to-last section:

http://gearman.org/index.php?id=protocol

Basically you telnet to the Gearman server port (TCP 4730 by default), and you can issue a few text commands, including 'status' and 'maxqueue'. Very handy!

-Keith

Chris Were

unread,
Oct 20, 2009, 2:18:07 AM10/20/09
to Keith Kruepke, gea...@googlegroups.com
Thanks Keith, the status command was what I needed.

I'm still not sure where to find the default queue length though. I may have missed it, but all the documentation seems to refer to the "default queue length", but I can't find where that is defined.

Cheers,
Chris

Eric Day

unread,
Oct 20, 2009, 3:06:14 AM10/20/09
to gea...@googlegroups.com, Keith Kruepke
Hi Chris,

By default, there is no queue length limit. You can only set the limit
via telnet right now, but perhaps a gearmand command line option is
in order to specify a default limit.

-Eric

Reply all
Reply to author
Forward
0 new messages