Question

I have beanstalk installed on my server, and run the following:

$ telnet localhost 11300
use my_tube
USING my_tube
peek-ready
FOUND 11065 41
{"ts":1295537419,"data":{"nid":"212156"}}

Now my question is: how can I get a list of all jobs in the queue; something like peek-all?

Was it helpful?

Solution

There are some forks of the main code that provide this sort of information (retrieving ready, reserved, and buried jobs in a tube), but its not in the main trunk version. This is because of the problems that it can bring - such as on a huge implementation it would have to return a potentially vast amount of data and block the server from doing any other work in the meantime.

Ultimately, BeanstalkD is a queue - not an array, and not designed to allow access to every item within it - it returns the next item to work on.

Thinking of the problem from another direction may be useful - such as asking why you need the information about the contents of the queue, and possibly assembling the data you would need as items are being added, by your own code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top