PHP-Resque workers can be started from a script with something like
passthru("nohup php " . __RESQUE_BIN__ . " >> " . __RESQUE_LOG__ . " 2>&1 &");
But how do i pause them, or stop them from a php script ?
PHP-Resque workers can be started from a script with something like
passthru("nohup php " . __RESQUE_BIN__ . " >> " . __RESQUE_LOG__ . " 2>&1 &");
But how do i pause them, or stop them from a php script ?
Check the README, you can send signals to worker processes to do what you ask:
QUIT
- Wait for child to finish processing then exitTERM
/INT
- Immediately kill child then exitUSR1
- Immediately kill child but don't exitUSR2
- Pause worker, no new jobs will be processedCONT
- Resume worker.You will need the pid of the worker, you can send a signal with posix_kill