mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
refactor process title to keep it DRY
This commit is contained in:
parent
62dfa93458
commit
6ed8fc048f
@ -324,11 +324,12 @@ class Resque_Worker
|
||||
*/
|
||||
private function updateProcLine($status)
|
||||
{
|
||||
$processTitle = 'resque-' . Resque::VERSION . ': ' . $status;
|
||||
if(function_exists('cli_set_process_title')) {
|
||||
cli_set_process_title('resque-' . Resque::VERSION . ': ' . $status);
|
||||
cli_set_process_title($processTitle);
|
||||
}
|
||||
else if(function_exists('setproctitle')) {
|
||||
setproctitle('resque-' . Resque::VERSION . ': ' . $status);
|
||||
setproctitle($processTitle);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user