Hello Keith, Thank so much for the reply.
I did tried not to unset the $pheanstalk object before. It produces same result. In the second script (Step 2), you might notice that there are two(2) unset lines. What happens in the 2nd script is that: 1. Instantiate (create connection) of pheanstalk. 2. Reserve the FIRST job 3. UNSET $pheanstalk instance. 4. Instantiate another pheanstalk. 5. Reserve the SECOND job. 6. UNSET $pheanstalk instance. And this works as expected. The second "reserve" call did returned the next Job which is "Job 2". Now for the 3rd page, it executes another reserve command (to Reserve Job 3, which should be the next ready Job in queue). But , instead of getting JOB 3 it gets JOB 1 (which was already reserved earlier). The difference is , in the 2nd script.. the two(2) reserve commands are inside the same script. They work as expected even if the $pheanstalk instance is not being "unset". But the 3rd reserve command that should get the 3rd Job (Job 3) is in another script which is executed in another browser/tab. At first look.. it seems that pheanstalk or beanstalkd recognizes browser sessions exclusively. If that's the case, then "burying" the Job after reserving it will still not work if I run the 3rd script separately. But the bury command DOES WORK. The 3rd script gets the correct job after executing it (as long as I "bury" the first 2 jobs after reserving them in the first script). Thank you so much for you time. We are a bit stuck on this since this is a big part of the project that we're building for workers. Basically , workers logs in to the web app that we made (in any machine/location) and ALL workers use 1 common Tube/Queue only to get the jobs to process. So, if 1 worker reserves a Job and works on it.. the next available worker should not be able to reserve the Job that was already reserved by another worker. Cheers! Jian -- 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.
