Beanstalkd doesn't return the tube that the job came from with the job itself, but you can query for it - with the command 'stats-job'.
put 1 0 100 5
hello
INSERTED 10
reserve
RESERVED 10 5
hello
stats-job 10
OK 143
---
id: 10
tube: default
state: reserved
pri: 1
age: 33
delay: 0
ttr: 100
time-left: 82
reserves: 1
timeouts: 0
releases: 0
buries: 0
kicks: 0
I put a simple job in, reserve it (and get the job-ID back: 10), then run 'stats-job', for the id, getting the original tube, and other information.
Pheanstalk has the statsJob
function, that you pass in the job (as returned from reserve
).
If there was anything else that you can't get about a particular job, you can always put meta-information into the job itself.