Merge pull request #131 from richardkmiller/updateProcLine-php5.5

Let Resque_Worker::updateProcLine() use PHP 5.5's cli_set_process_title() if available
This commit is contained in:
Chris Boulton 2013-09-06 18:03:51 -07:00
commit 7f2cba1553

View File

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