Don't return from pruneDeadWorkers if there are no worker pids

This commit is contained in:
Chris Boulton 2010-04-19 15:44:46 +10:00
parent b71031908d
commit 94fed1cfb4

View File

@ -423,9 +423,6 @@ class Resque_Worker
public function pruneDeadWorkers() public function pruneDeadWorkers()
{ {
$workerPids = $this->workerPids(); $workerPids = $this->workerPids();
if(empty($workerPids)) {
return;
}
$workers = self::all(); $workers = self::all();
foreach($workers as $worker) { foreach($workers as $worker) {
list($host, $pid, $queues) = explode(':', (string)$worker, 3); list($host, $pid, $queues) = explode(':', (string)$worker, 3);