Skip to content

Commit 7f2cba1

Browse files
committed
Merge pull request #131 from richardkmiller/updateProcLine-php5.5
Let Resque_Worker::updateProcLine() use PHP 5.5's cli_set_process_title() if available
2 parents 468f1ce + 9335ef5 commit 7f2cba1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Resque/Worker.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,12 @@ private function startup()
324324
*/
325325
private function updateProcLine($status)
326326
{
327-
if(function_exists('setproctitle')) {
328-
setproctitle('resque-' . Resque::VERSION . ': ' . $status);
327+
$processTitle = 'resque-' . Resque::VERSION . ': ' . $status;
328+
if(function_exists('cli_set_process_title')) {
329+
cli_set_process_title($processTitle);
330+
}
331+
else if(function_exists('setproctitle')) {
332+
setproctitle($processTitle);
329333
}
330334
}
331335

0 commit comments

Comments
 (0)