mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Re-enable support for queues
This commit is contained in:
parent
e0c5cb61a8
commit
06d281a216
@ -411,10 +411,13 @@ class InvoiceController extends BaseController
|
||||
if ($invoice->is_recurring) {
|
||||
$response = $this->emailRecurringInvoice($invoice);
|
||||
} else {
|
||||
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice, false, $pdfUpload);
|
||||
$response = true;
|
||||
//$this->dispatch(new SendInvoiceEmail($invoice, false, $pdfUpload));
|
||||
//return true;
|
||||
// TODO remove this with Laravel 5.3 (https://github.com/invoiceninja/invoiceninja/issues/1303)
|
||||
if (config('queue.default') === 'sync') {
|
||||
$response = app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice, false, $pdfUpload);
|
||||
} else {
|
||||
$this->dispatch(new SendInvoiceEmail($invoice, false, $pdfUpload));
|
||||
$response = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($response === true) {
|
||||
@ -445,9 +448,13 @@ class InvoiceController extends BaseController
|
||||
if ($invoice->isPaid()) {
|
||||
return true;
|
||||
} else {
|
||||
return app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
//$this->dispatch(new SendInvoiceEmail($invoice));
|
||||
//return true;
|
||||
// TODO remove this with Laravel 5.3 (https://github.com/invoiceninja/invoiceninja/issues/1303)
|
||||
if (config('queue.default') === 'sync') {
|
||||
return app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
} else {
|
||||
$this->dispatch(new SendInvoiceEmail($invoice));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -779,8 +779,12 @@ class InvoiceRepository extends BaseRepository
|
||||
*/
|
||||
public function emailInvoice(Invoice $invoice)
|
||||
{
|
||||
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
//dispatch(new SendInvoiceEmail($invoice));
|
||||
// TODO remove this with Laravel 5.3 (https://github.com/invoiceninja/invoiceninja/issues/1303)
|
||||
if (config('queue.default') === 'sync') {
|
||||
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||
} else {
|
||||
dispatch(new SendInvoiceEmail($invoice));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user