Move lightlogs back to batching

This commit is contained in:
David Bomba 2022-09-09 11:07:14 +10:00
parent 2f322d630d
commit 61b6bb4543
5 changed files with 6 additions and 9 deletions

View File

@ -306,7 +306,7 @@ class PreviewController extends BaseController
if (Ninja::isHosted()) {
LightLogs::create(new LivePreview())
->increment()
->queue();
->batch();
}
$response = Response::make($file_path, 200);

View File

@ -69,7 +69,7 @@ class QueryLogging
}
LightLogs::create(new DbQuery($request->method(), substr(urldecode($request->url()),0,180), $count, $time, $ip))
->queue();
->batch();
}
return $response;

View File

@ -123,7 +123,7 @@ class NinjaMailerJob implements ShouldQueue
->send($this->nmo->mailable);
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
->queue();
->batch();
/* Count the amount of emails sent across all the users accounts */
Cache::increment($this->company->account->key);

View File

@ -217,7 +217,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
$this->request['MessageID']
);
LightLogs::create($bounce)->queue();
LightLogs::create($bounce)->batch();
SystemLogger::dispatch($this->request, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_BOUNCED, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company);
@ -263,7 +263,7 @@ class ProcessPostmarkWebhook implements ShouldQueue
$this->request['MessageID']
);
LightLogs::create($spam)->queue();
LightLogs::create($spam)->batch();
SystemLogger::dispatch($this->request, SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_SPAM_COMPLAINT, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company);

View File

@ -45,10 +45,7 @@ class VendorContact extends Authenticatable implements HasLocalePreference
'hashed_id',
];
protected $with = [
// 'vendor',
// 'company'
];
protected $with = [];
protected $casts = [
'updated_at' => 'timestamp',