Skip to content

Commit 6ed8fc0

Browse files
refactor process title to keep it DRY
1 parent 62dfa93 commit 6ed8fc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Resque/Worker.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,12 @@ private function startup()
324324
*/
325325
private function updateProcLine($status)
326326
{
327+
$processTitle = 'resque-' . Resque::VERSION . ': ' . $status;
327328
if(function_exists('cli_set_process_title')) {
328-
cli_set_process_title('resque-' . Resque::VERSION . ': ' . $status);
329+
cli_set_process_title($processTitle);
329330
}
330331
else if(function_exists('setproctitle')) {
331-
setproctitle('resque-' . Resque::VERSION . ': ' . $status);
332+
setproctitle($processTitle);
332333
}
333334
}
334335

0 commit comments

Comments
 (0)