forked from GNUsocial/gnu-social
Always queue inbox distribution
This commit is contained in:
parent
c0f65f6ea7
commit
00db57949f
|
@ -2071,28 +2071,23 @@ class Notice extends Managed_DataObject
|
||||||
Inbox::insertNotice($this, $user->id);
|
Inbox::insertNotice($this, $user->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (common_config('queue', 'inboxes')) {
|
// If there's a failure, we want to _force_
|
||||||
// If there's a failure, we want to _force_
|
// distribution at this point.
|
||||||
// distribution at this point.
|
try {
|
||||||
|
$qm = QueueManager::get();
|
||||||
|
$qm->enqueue($this, 'distrib');
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// If the exception isn't transient, this
|
||||||
|
// may throw more exceptions as DQH does
|
||||||
|
// its own enqueueing. So, we ignore them!
|
||||||
try {
|
try {
|
||||||
$qm = QueueManager::get();
|
$handler = new DistribQueueHandler();
|
||||||
$qm->enqueue($this, 'distrib');
|
$handler->handle($this);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// If the exception isn't transient, this
|
common_log(LOG_ERR, "emergency redistribution resulted in " . $e->getMessage());
|
||||||
// may throw more exceptions as DQH does
|
|
||||||
// its own enqueueing. So, we ignore them!
|
|
||||||
try {
|
|
||||||
$handler = new DistribQueueHandler();
|
|
||||||
$handler->handle($this);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
common_log(LOG_ERR, "emergency redistribution resulted in " . $e->getMessage());
|
|
||||||
}
|
|
||||||
// Re-throw so somebody smarter can handle it.
|
|
||||||
throw $e;
|
|
||||||
}
|
}
|
||||||
} else {
|
// Re-throw so somebody smarter can handle it.
|
||||||
$handler = new DistribQueueHandler();
|
throw $e;
|
||||||
$handler->handle($this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ $default =
|
||||||
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
|
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
|
||||||
'spawndelay' => 1, // Wait at least N seconds between (re)spawns of child processes to avoid slamming the queue server with subscription startup
|
'spawndelay' => 1, // Wait at least N seconds between (re)spawns of child processes to avoid slamming the queue server with subscription startup
|
||||||
'debug_memory' => false, // true to spit memory usage to log
|
'debug_memory' => false, // true to spit memory usage to log
|
||||||
'inboxes' => true, // true to do inbox distribution & output queueing from in background via 'distrib' queue
|
|
||||||
'breakout' => array(), // List queue specifiers to break out when using Stomp queue.
|
'breakout' => array(), // List queue specifiers to break out when using Stomp queue.
|
||||||
// Default will share all queues for all sites within each group.
|
// Default will share all queues for all sites within each group.
|
||||||
// Specify as <group>/<queue> or <group>/<queue>/<site>,
|
// Specify as <group>/<queue> or <group>/<queue>/<site>,
|
||||||
|
|
Loading…
Reference in New Issue