mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-21 16:01:53 +00:00
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:
commit
7f2cba1553
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user