mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-01 13:47:23 +00:00
136 - Refactoring for Robustness
This commit is contained in:
@@ -33,8 +33,10 @@ class SendAttendeeMessage implements ShouldQueue
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->attendeeMessage->recipients()->each(function ($recipient) {
|
||||
Mail::to($recipient)->send(new AttendeeMessageEmail($this->attendeeMessage));
|
||||
$this->attendeeMessage->withChunkedRecipients(20, function ($recipients) {
|
||||
$recipients->each(function ($recipient) {
|
||||
Mail::to($recipient)->queue(new AttendeeMessageEmail($this->attendeeMessage));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user