mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 18:14:35 -04:00
Fixes for failed email mailer, edge case where balances may not adjust correctly
This commit is contained in:
parent
a26c50dca3
commit
5f0d905265
@ -129,11 +129,8 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
// nlog('Using ' . ((int) (memory_get_usage(true) / (1024 * 1024))) . 'MB ');
|
|
||||||
|
|
||||||
$this->nmo = null;
|
$this->nmo = null;
|
||||||
$this->company = null;
|
$this->company = null;
|
||||||
app('queue.worker')->shouldQuit = 1;
|
|
||||||
|
|
||||||
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
|
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
|
||||||
|
|
||||||
|
@ -14,11 +14,19 @@ namespace App\Listeners\Invoice;
|
|||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Activity;
|
use App\Models\Activity;
|
||||||
use App\Repositories\ActivityRepository;
|
use App\Repositories\ActivityRepository;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
use stdClass;
|
use stdClass;
|
||||||
|
|
||||||
class InvoiceEmailFailedActivity implements ShouldQueue
|
class InvoiceEmailFailedActivity implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $delay = 10;
|
||||||
|
|
||||||
protected $activity_repo;
|
protected $activity_repo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,13 +18,18 @@ use App\Libraries\MultiDB;
|
|||||||
use App\Mail\Admin\EntityFailedSendObject;
|
use App\Mail\Admin\EntityFailedSendObject;
|
||||||
use App\Notifications\Admin\EntitySentNotification;
|
use App\Notifications\Admin\EntitySentNotification;
|
||||||
use App\Utils\Traits\Notifications\UserNotifies;
|
use App\Utils\Traits\Notifications\UserNotifies;
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
class InvoiceFailedEmailNotification
|
class InvoiceFailedEmailNotification
|
||||||
{
|
{
|
||||||
use UserNotifies;
|
|
||||||
|
|
||||||
public $delay = 5;
|
use UserNotifies, Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $delay = 10;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ class ActivityRepository extends BaseRepository
|
|||||||
$activity->save();
|
$activity->save();
|
||||||
|
|
||||||
//rate limiter
|
//rate limiter
|
||||||
// $this->createBackup($entity, $activity);
|
$this->createBackup($entity, $activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user