From 65493c47a5e56a43ce788bce3a6e3cac1d7cacaa Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 11 Dec 2021 20:49:29 +1100 Subject: [PATCH] Change batch() to ->queue() --- app/Http/Controllers/Auth/LoginController.php | 4 ++-- app/Http/Controllers/CompanyController.php | 2 +- app/Http/Controllers/PostMarkController.php | 4 ++-- app/Http/Controllers/PreviewController.php | 2 +- app/Http/Middleware/QueryLogging.php | 2 +- app/Jobs/Account/CreateAccount.php | 2 +- app/Jobs/Mail/NinjaMailerJob.php | 4 ++-- app/Jobs/RecurringInvoice/SendRecurring.php | 2 +- app/Jobs/Util/Import.php | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 20186943c2e5..2d8ea8fef702 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -176,7 +176,7 @@ class LoginController extends BaseController LightLogs::create(new LoginSuccess()) ->increment() - ->batch(); + ->queue(); $user = $this->guard()->user(); @@ -249,7 +249,7 @@ class LoginController extends BaseController LightLogs::create(new LoginFailure()) ->increment() - ->batch(); + ->queue(); // SystemLogger::dispatch( // json_encode(['ip' => request()->getClientIp()]), diff --git a/app/Http/Controllers/CompanyController.php b/app/Http/Controllers/CompanyController.php index b83d472977f0..7d6e0814df3c 100644 --- a/app/Http/Controllers/CompanyController.php +++ b/app/Http/Controllers/CompanyController.php @@ -504,7 +504,7 @@ class CompanyController extends BaseController LightLogs::create(new AccountDeleted()) ->increment() - ->batch(); + ->queue(); } else { $company_id = $company->id; diff --git a/app/Http/Controllers/PostMarkController.php b/app/Http/Controllers/PostMarkController.php index e6e1d2797fad..60bb918e688a 100644 --- a/app/Http/Controllers/PostMarkController.php +++ b/app/Http/Controllers/PostMarkController.php @@ -170,7 +170,7 @@ class PostMarkController extends BaseController $request->input('MessageID') ); - LightLogs::create($bounce)->batch(); + LightLogs::create($bounce)->queue(); SystemLogger::dispatch($request->all(), SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_BOUNCED, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company); } @@ -212,7 +212,7 @@ class PostMarkController extends BaseController $request->input('MessageID') ); - LightLogs::create($spam)->batch(); + LightLogs::create($spam)->queue(); SystemLogger::dispatch($request->all(), SystemLog::CATEGORY_MAIL, SystemLog::EVENT_MAIL_SPAM_COMPLAINT, SystemLog::TYPE_WEBHOOK_RESPONSE, $this->invitation->contact->client, $this->invitation->company); } diff --git a/app/Http/Controllers/PreviewController.php b/app/Http/Controllers/PreviewController.php index 052a1a3c9dcb..9978033a4430 100644 --- a/app/Http/Controllers/PreviewController.php +++ b/app/Http/Controllers/PreviewController.php @@ -294,7 +294,7 @@ class PreviewController extends BaseController { LightLogs::create(new LivePreview()) ->increment() - ->batch(); + ->queue(); } diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index 4b08ad38ca44..1eac23e7f310 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -68,7 +68,7 @@ class QueryLogging } LightLogs::create(new DbQuery($request->method(), urldecode($request->url()), $count, $time, $ip)) - ->batch(); + ->queue(); } diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index a34f266c764d..75b230298e06 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -136,7 +136,7 @@ class CreateAccount LightLogs::create(new AnalyticsAccountCreated()) ->increment() - ->batch(); + ->queue(); diff --git a/app/Jobs/Mail/NinjaMailerJob.php b/app/Jobs/Mail/NinjaMailerJob.php index 72cc5fcef935..83a5b62bff7e 100644 --- a/app/Jobs/Mail/NinjaMailerJob.php +++ b/app/Jobs/Mail/NinjaMailerJob.php @@ -110,7 +110,7 @@ class NinjaMailerJob implements ShouldQueue ->send($this->nmo->mailable); LightLogs::create(new EmailSuccess($this->nmo->company->company_key)) - ->batch(); + ->queue(); /* Count the amount of emails sent across all the users accounts */ Cache::increment($this->company->account->key); @@ -279,7 +279,7 @@ class NinjaMailerJob implements ShouldQueue $job_failure->string_metric6 = substr($errors, 0, 150); LightLogs::create($job_failure) - ->batch(); + ->queue(); } public function failed($exception = null) diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 46ba3400fc3e..0f722256a3c1 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -192,7 +192,7 @@ class SendRecurring implements ShouldQueue $job_failure->string_metric6 = $exception->getMessage(); LightLogs::create($job_failure) - ->batch(); + ->queue(); nlog(print_r($exception->getMessage(), 1)); } diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index 467ac973da5d..347ed8998dd7 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -1832,7 +1832,7 @@ class Import implements ShouldQueue $job_failure->string_metric6 = $exception->getMessage(); LightLogs::create($job_failure) - ->batch(); + ->queue(); info(print_r($exception->getMessage(), 1));