Is there any plan to support atomically moving a job from one tube to
another? This would be really useful to make routing jobs between
tubes safer and more efficient. I'm imagining a "move" operation for a
reserved job. It would be very similar to "release", but instead of
returning the job to the tube from which it was reserved, it would
move the job to the end of the currently used tube.

Here's some hypothetical documentation:

The "move" command moves a reserved job into the ready queue of the
currently
used tube. It is normally used when routing jobs between tubes. It
looks like this:

move <id> <pri> <delay> <ttr>\r\n

 - <id> is the job id to move.

 - <pri> is a new priority to assign to the job.

 - <delay> is a new integer number of seconds to wait before putting
the job in
   the ready queue. The job will be in the "delayed" state during this
time.

 - <ttr> -- time to run -- is an integer number of seconds to allow a
worker
   to run this job. This time is counted from the moment a worker
reserves
   this job. If the worker does not delete, release, or bury the job
within
   <ttr> seconds, the job will time out and the server will release
the job.
   The minimum ttr is 1. If the client sends 0, the server will
silently
   increase the ttr to 1.

The client expects one line of response, which may be:

 - "MOVED\r\n" to indicate success.

 - "BURIED\r\n" if the server ran out of memory trying to grow the
priority
   queue data structure.

 - "NOT_FOUND\r\n" if the job does not exist or is not reserved by the
client.


Thoughts?

Also, it would be more efficient to be able to put directly to a tube
without having to use it first. I'm curious, is there a technical
reason why this isn't currently supported?

On a related note, kr, several months ago you mentioned that there is
a lot of room for further optimization re: large numbers of tubes.
FWIW, that could greatly benefit a project I'm working on.

Finally, I wanted to say how much I love Beanstalk. It's very Unix-y.
It does one thing and does it extremely well. Please keep it simple!

Thanks,

-Geoff

-- 
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