Only enqueue inbox-dependent transports after inboxes have been filled

This commit is contained in:
Evan Prodromou
2009-05-28 18:19:22 -04:00
parent 047038959c
commit 3532cd0490
3 changed files with 46 additions and 20 deletions

View File

@@ -41,7 +41,7 @@ class InboxQueueHandler extends QueueHandler
}
function start() {
$this->log(LOG_INFO, "INITIALIZE");
$this->log(LOG_INFO, "Initialize inbox queue handler");
return true;
}
@@ -49,11 +49,19 @@ class InboxQueueHandler extends QueueHandler
{
$this->log(LOG_INFO, "Distributing notice to inboxes for $notice->id");
$notice->addToInboxes();
$notice->saveGroups();
$notice->blowSubsCache();
$transports = common_post_inbox_transports();
foreach ($transports as $transport) {
common_enqueue_notice_transport($notice, $transport);
}
return true;
}
function finish() {
$this->log(LOG_INFO, "Terminating inbox queue handler");
}
}