summaryrefslogtreecommitdiff
path: root/lib/queuemanager.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-01 11:34:12 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-01 11:34:12 -0400
commite0bf8ad95b2d2ddc7b988c25e9cffa20075a5d8c (patch)
tree958a611621144a89000c6dbe501b488f217fb1c6 /lib/queuemanager.php
parent7b66a129139d8c2f03677f6a5b71412a111f655d (diff)
Add UnQueueManager for immediate handling
Perhaps it's a little precious, but I took out the switches in util.php to determine what's supposed to be sent when, and made a queuemanager class that will just do things when they're supposed to be done.
Diffstat (limited to 'lib/queuemanager.php')
-rw-r--r--lib/queuemanager.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/queuemanager.php b/lib/queuemanager.php
index 92f0e10de..6bb21de9b 100644
--- a/lib/queuemanager.php
+++ b/lib/queuemanager.php
@@ -36,9 +36,15 @@ class QueueManager
{
if (empty(self::$qm)) {
- $type = common_config('queue', 'sub');
+ if (Event::handle('StartNewQueueManager', array(&self::$qm))) {
- if (Event::handle('StartNewQueueManager', array($type, &self::$qm))) {
+ $enabled = common_config('queue', 'enabled');
+ $type = common_config('queue', 'sub');
+
+ if (!$enabled) {
+ // does everything immediately
+ return new UnQueueManager();
+ }
switch ($type) {
case 'db':