Inject delay into Send Recurring invoices to allow PDFs to catch up

This commit is contained in:
David Bomba 2022-07-31 19:20:18 +10:00
parent 48c36d0004
commit 57e1eb7a8e

View File

@ -135,7 +135,7 @@ class SendRecurring implements ShouldQueue
$invoice->invitations->each(function ($invitation) use ($invoice) {
if ($invitation->contact && ! $invitation->contact->trashed() && strlen($invitation->contact->email) >= 1 && $invoice->client->getSetting('auto_email_invoice')) {
try {
EmailEntity::dispatch($invitation, $invoice->company);
EmailEntity::dispatch($invitation, $invoice->company)->delay(10);
} catch (\Exception $e) {
nlog($e->getMessage());
}