cli_set_process_title() available in PHP 5.5 to set proc title. This is preferred over the PECL function setproctitle().

This commit is contained in:
Richard K Miller 2013-09-04 10:29:01 -06:00
parent 468f1ce78a
commit 62dfa93458

View File

@ -324,7 +324,10 @@ class Resque_Worker
*/ */
private function updateProcLine($status) private function updateProcLine($status)
{ {
if(function_exists('setproctitle')) { if(function_exists('cli_set_process_title')) {
cli_set_process_title('resque-' . Resque::VERSION . ': ' . $status);
}
else if(function_exists('setproctitle')) {
setproctitle('resque-' . Resque::VERSION . ': ' . $status); setproctitle('resque-' . Resque::VERSION . ': ' . $status);
} }
} }