Skip to content

Commit 63ce150

Browse files
committed
moved setting the process name to setter
1 parent e473ef0 commit 63ce150

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/Resque/Worker.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Resque_Worker
1414
/**
1515
* @var string Prefix for the process name
1616
*/
17-
public static $processPrefix = 'resque-';
17+
private static $processPrefix = 'resque-';
1818

1919
/**
2020
* @var LoggerInterface Logging object that impliments the PSR-3 LoggerInterface
@@ -81,6 +81,15 @@ public function __construct($queues)
8181
$this->id = $this->hostname . ':'.getmypid() . ':' . implode(',', $this->queues);
8282
}
8383

84+
/**
85+
* Set the process prefix of the workers to the given prefix string.
86+
* @param string $prefix The new process prefix
87+
*/
88+
public static function setProcessPrefix($prefix)
89+
{
90+
self::$processPrefix = $prefix;
91+
}
92+
8493
/**
8594
* Return all workers known to Resque as instantiated instances.
8695
* @return array

0 commit comments

Comments
 (0)