refactor process title to keep it DRY

This commit is contained in:
Richard K Miller 2013-09-04 12:29:38 -06:00
parent 62dfa93458
commit 6ed8fc048f

View File

@ -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);
} }
} }