From 3555e5a91ce90afa00d157f69208a390f58e4f0c Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 25 May 2024 10:33:35 +1000 Subject: [PATCH] Dont cache the mail:send query --- app/Console/Commands/MailSend.php | 4 +++- app/Jobs/MailSend.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/MailSend.php b/app/Console/Commands/MailSend.php index 2e49cef..a29cb61 100644 --- a/app/Console/Commands/MailSend.php +++ b/app/Console/Commands/MailSend.php @@ -27,7 +27,7 @@ class MailSend extends Command /** * Execute the console command. */ - public function handle() + public function handle(): int { switch ($this->option('type')) { case 'crash': @@ -48,5 +48,7 @@ class MailSend extends Command default: $this->error('Specify -T crash, normal or all'); } + + return self::SUCCESS; } } \ No newline at end of file diff --git a/app/Jobs/MailSend.php b/app/Jobs/MailSend.php index 257d382..bc26dbe 100644 --- a/app/Jobs/MailSend.php +++ b/app/Jobs/MailSend.php @@ -65,6 +65,7 @@ class MailSend #implements ShouldQueue }) ->groupBy('a.system_id','a.id','a.zone_id','addresses.region_id','a.host_id','a.node_id','a.point_id','addresses.hub_id','addresses.role') ->with(['system','zone.domain']) + ->dontCache() ->get(); // Return the system we poll