forked from GNUsocial/gnu-social
on exceptions, stomp logs the error and reenqueues
This commit is contained in:
parent
def5d56ce1
commit
4ae31f3476
@ -31,7 +31,6 @@
|
|||||||
require_once 'Stomp.php';
|
require_once 'Stomp.php';
|
||||||
require_once 'Stomp/Exception.php';
|
require_once 'Stomp/Exception.php';
|
||||||
|
|
||||||
|
|
||||||
class StompQueueManager extends QueueManager
|
class StompQueueManager extends QueueManager
|
||||||
{
|
{
|
||||||
protected $servers;
|
protected $servers;
|
||||||
@ -587,7 +586,15 @@ class StompQueueManager extends QueueManager
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If there's an exception when handling,
|
||||||
|
// log the error and let it get requeued.
|
||||||
|
|
||||||
|
try {
|
||||||
$ok = $handler->handle($item);
|
$ok = $handler->handle($item);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->_log(LOG_ERR, "Exception on queue $queue: " . $e->getMessage());
|
||||||
|
$ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$ok) {
|
if (!$ok) {
|
||||||
$this->_log(LOG_WARNING, "Failed handling $info");
|
$this->_log(LOG_WARNING, "Failed handling $info");
|
||||||
|
Loading…
Reference in New Issue
Block a user