diff options
Diffstat (limited to 'scripts/queuedaemon.php')
-rwxr-xr-x | scripts/queuedaemon.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/queuedaemon.php b/scripts/queuedaemon.php index 162f617e0..6cce4eaa7 100755 --- a/scripts/queuedaemon.php +++ b/scripts/queuedaemon.php @@ -122,7 +122,7 @@ class QueueDaemon extends Daemon if ($this->threads > 1) { return $this->runThreads(); } else { - return $this->runLoop(); + return $this->runLoop(true); } } @@ -176,7 +176,8 @@ class QueueDaemon extends Daemon { $this->set_id($this->get_id() . "." . $thread); $this->resetDb(); - $this->runLoop(); + //only include global singletons on the first thread + $this->runLoop($thread == 1); } /** @@ -213,14 +214,18 @@ class QueueDaemon extends Daemon * * Most of the time this won't need to be overridden in a subclass. * + * @param boolean $includeGlobalSingletons Include IoManagers that are + * global singletons (should only be one instance - regardless of how + * many processes or sites there are) + * * @return boolean true on success, false on failure */ - function runLoop() + function runLoop($includeGlobalSingletons) { $this->log(LOG_INFO, 'checking for queued notices'); $master = new IoMaster($this->get_id()); - $master->init($this->all); + $master->init($this->all, $includeGlobalSingletons); $master->service(); $this->log(LOG_INFO, 'finished servicing the queue'); |