mirror of
https://github.com/idanoo/php-resque
synced 2025-07-03 06:32:21 +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
1 changed files with 6 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue