X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fstompqueuemanager.php;h=4084470e211f9cc0c656c18512f637bf6cd48e19;hb=d5d806863240379fe23e081c75097ddee53babec;hp=7dd3e6961e005857bf5bbb729a2d4d11cf8ccf2f;hpb=8884a5255fb90fda67b63fa0d4252d77176337e5;p=quix0rs-gnu-social.git diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php index 7dd3e6961e..4084470e21 100644 --- a/lib/stompqueuemanager.php +++ b/lib/stompqueuemanager.php @@ -498,8 +498,9 @@ class StompQueueManager extends QueueManager // @fixme detect failing site switches $this->switchSite($site); - $item = $this->decode($message['payload']); - if (empty($item)) { + try { + $item = $this->decode($message['payload']); + } catch (Exception $e) { $this->_log(LOG_ERR, "Skipping empty or deleted item in queue $queue from $host"); $this->stats('baditem', $queue); return false; @@ -637,9 +638,9 @@ class StompQueueManager extends QueueManager */ function switchSite($site) { - if ($site != StatusNet::currentSite()) { + if ($site != GNUsocial::currentSite()) { $this->stats('switch'); - StatusNet::switchSite($site); + GNUsocial::switchSite($site); $this->initialize(); } } @@ -656,7 +657,7 @@ class StompQueueManager extends QueueManager */ protected function updateSiteConfig($nickname) { - $sn = Status_network::staticGet('nickname', $nickname); + $sn = Status_network::getKV('nickname', $nickname); if ($sn) { $this->switchSite($nickname); if (!in_array($nickname, $this->sites)) { @@ -682,7 +683,7 @@ class StompQueueManager extends QueueManager protected function queueName($queue) { $group = $this->queueGroup($queue); - $site = StatusNet::currentSite(); + $site = GNUsocial::currentSite(); $specs = array("$group/$queue/$site", "$group/$queue");