mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 13:42:22 +00:00
refactor process title to keep it DRY
This commit is contained in:
parent
62dfa93458
commit
6ed8fc048f
1 changed files with 3 additions and 2 deletions
|
@ -324,11 +324,12 @@ class Resque_Worker
|
||||||
*/
|
*/
|
||||||
private function updateProcLine($status)
|
private function updateProcLine($status)
|
||||||
{
|
{
|
||||||
|
$processTitle = 'resque-' . Resque::VERSION . ': ' . $status;
|
||||||
if(function_exists('cli_set_process_title')) {
|
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')) {
|
else if(function_exists('setproctitle')) {
|
||||||
setproctitle('resque-' . Resque::VERSION . ': ' . $status);
|
setproctitle($processTitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue