Prevent duplicate events firing on save

This commit is contained in:
= 2021-09-05 20:31:08 +10:00
parent 4a2e52738f
commit 72bbcf2bb2
5 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ class HostedMigrations extends Command
*
* @var string
*/
protected $signature = 'migrations:hosted-import {--email=}';
protected $signature = 'ninja:import {--email=}';
/**
* The console command description.

View File

@ -43,7 +43,7 @@ class ImportMigrations extends Command
*
* @var string
*/
protected $signature = 'migrations:import {--path=}';
protected $signature = 'ninja:old-import {--path=}';
/**
* The console command description.

View File

@ -36,7 +36,7 @@ class WebhookHandler implements ShouldQueue
private $company;
public $tries = 1; //number of retries
public $tries = 3; //number of retries
public $backoff = 10; //seconds to wait until retry

View File

@ -46,7 +46,7 @@ class InvoiceObserver
* @return void
*/
public function updated(Invoice $invoice)
{
{nlog("updated");
$subscriptions = Webhook::where('company_id', $invoice->company->id)
->where('event_id', Webhook::EVENT_UPDATE_INVOICE)
->exists();

View File

@ -209,7 +209,7 @@ class BaseRepository
$model->custom_surcharge_tax3 = $client->company->custom_surcharge_taxes3;
$model->custom_surcharge_tax4 = $client->company->custom_surcharge_taxes4;
$model->save();
$model->saveQuietly();
/* Model now persisted, now lets do some child tasks */