1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Do all push mail in a bunch at the end, too

Summary: Same deal as transaction mail. Improves robustness.

Test Plan: Pushed stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D13451
This commit is contained in:
epriestley 2015-06-25 15:54:56 -07:00
parent 42fd13e793
commit 14229042a2

View file

@ -30,8 +30,14 @@ final class PhabricatorRepositoryPushMailWorker
$targets = id(new PhabricatorRepositoryPushReplyHandler())
->setMailReceiver($repository)
->getMailTargets($email_phids, array());
$messages = array();
foreach ($targets as $target) {
$this->sendMail($target, $repository, $event);
$messages[] = $this->sendMail($target, $repository, $event);
}
foreach ($messages as $message) {
$message->save();
}
}
@ -121,7 +127,7 @@ final class PhabricatorRepositoryPushMailWorker
->addHeader('Thread-Topic', $subject)
->setIsBulk(true);
$target->sendMail($mail);
return $target->willSendMail($mail);
}
public function renderForDisplay(PhabricatorUser $viewer) {