X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Funqueuemanager.php;h=0540b767d218300c03c58bbfb603bd7b7dfc36f1;hb=f134a423f6a9e7bb61d069c4d6281c05417bbd45;hp=785de7c8ce25b629a7665fbb1ab3df22e19ab997;hpb=b7940ef39f476b6a4cd7619267b735e98b0d7cfa;p=quix0rs-gnu-social.git diff --git a/lib/unqueuemanager.php b/lib/unqueuemanager.php index 785de7c8ce..0540b767d2 100644 --- a/lib/unqueuemanager.php +++ b/lib/unqueuemanager.php @@ -38,19 +38,17 @@ class UnQueueManager extends QueueManager * that can be processed quickly and don't need polling or long-running * connections to another server such as XMPP. * - * @param Notice $object + * @param Notice $object this specific manager just handles Notice objects anyway * @param string $queue */ - function enqueue($object, $queue) + function enqueue($object, $transport) { - $notice = $object; - - $handler = $this->getHandler($queue); - if ($handler) { - $handler->handle($notice); - } else { - if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) { - throw new ServerException("UnQueueManager: Unknown queue: $queue"); + try { + $handler = $this->getHandler($transport); + $handler->handle($object); + } catch (NoQueueHandlerException $e) { + if (Event::handle('UnqueueHandleNotice', array(&$object, $transport))) { + throw new ServerException("UnQueueManager: Unknown queue transport: $transport"); } } }