Phalcon Queue\\Beanstalkd reserved job returns to ready tube after TTR while worker runs
0 reputation · 20 Oct 2025, 15:51 UTC
Phalcon Queue\\Beanstalkd job ownership after server TTR expiry
A worker reserves a job through Phalcon\\Queue\\Beanstalkd and starts processing. The beanstalkd server enforces time-to-run independently of the Phalcon client. If TTR elapses before the worker calls delete(), release(), or touch(), the server can return the job to the ready tube while the worker is still running.
Goal: determine whether the running worker can reliably detect that it no longer owns the job, so the application can stop work and avoid duplicate processing. The adapter does not appear to send a cancellation signal, expose a heartbeat, or provide a cooperative cancellation token for reserved jobs. touch() extends TTR only before expiration, and behavior may differ across Phalcon 3.x, 4.x, and 5.x. Confirm the installed adapter API locally before relying on it.
Can a Phalcon\\Queue\\Beanstalkd worker query the server to confirm continued ownership of a reserved job after TTR passes? Is there a supported way to receive cancellation or expiry notification from the adapter? Should applications treat every reserved job as potentially re-queued and rely on idempotency or external locks?