]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add a hook for the unqueuemanager
authorEvan Prodromou <evan@status.net>
Mon, 21 Sep 2009 18:23:35 +0000 (14:23 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 21 Sep 2009 18:23:35 +0000 (14:23 -0400)
EVENTS.txt
lib/unqueuemanager.php

index 64c3c08c7caec93741323d637360812c26d1b318..56f91f87a44dc1146655bddc0b594cce6038c1bb 100644 (file)
@@ -261,3 +261,7 @@ StartEnqueueNotice: about to add a notice to the queues (good place to add a new
 EndEnqueueNotice: after adding a notice to the queues
 - $notice: the notice being added
 - $transports: modifiable list of transports to use
+
+UnqueueHandleNotice: Handle a notice when no queue manager is available
+- $notice: the notice to handle
+- $queue: the "queue" that is being executed
\ No newline at end of file
index c5dc29d38640dd102602b0bd1ae56f7f3fca08ae..269ecdeaa0357b7ff07f20013eee8521641c3eed 100644 (file)
@@ -73,7 +73,9 @@ class UnQueueManager
             jabber_broadcast_notice($notice);
             break;
          default:
-            throw ServerException("UnQueueManager: Unknown queue: $type");
+            if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) {
+                throw ServerException("UnQueueManager: Unknown queue: $queue");
+            }
         }
     }