On Tue, Jul 14, 2009 at 3:08 PM, wam<[email protected]> wrote:
> I'm
> considering setting up a new tube which my worker processes will write
> into saying that they are now handling job X and finished with job X,
> and a status process monitors that queue building a representation of
> my current work queues. However, I was hoping there was a cleaner way.

That's not a bad plan. The technique you describe is pretty powerful.
(It will be easier to manage when Erlang-style mailbox tubes are
implemented.)

> Ideally, I'd like to be able to just peek() at every job in the queue
> by iterating over the job ids. However, although there is a 'total-
> jobs' which gives me the upper bound of the job range, there doesn't
> seem to be a minimum job id for to use, and looping from 1 through all
> job ids that have already been deleted seems like a very poor option.
> If the server stats listed the minimum-job id on the server, this
> would be a much simpler task that I could just mostly accomplish with
> 'peek()' and a loop.

It's not cheap to report the minimum job id accurately, but maybe
beanstalkd could provide a lower bound that is updated every so often.
That seems like it would fit your needs.

kr

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to