mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +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:
parent
42fd13e793
commit
14229042a2
1 changed files with 8 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue