I have a queue of work from external sources, and I need to regulate the speed with which units of work are released from the queue (lots of work comes in overnight, and I want to avoid dumping it all into the workplace at once).
The strategy I've been trying includes a "qManager" that releases one work unit, then sleeps for 20 seconds, then restarts itself by using CURL to its own URL. However I am finding that the CURL process hangs up waiting for the restarted task to end if I use GET and returns FALSE if I use POST.
What is a good way to (1) restart the qManager and (2) get a signal back that it restarted successfully, without waiting until the end of the restarted script?
Thanks and regards, ~Ray