From 944053972b20f53645d7b6bcb896b4c20cef9e5d Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 21 Oct 2024 08:47:54 +1100 Subject: [PATCH] Fix for 4bbb82 Job::dispatch doesnt return an int, so cannot be used for success status --- app/Console/Commands/CommBinkpSend.php | 7 ++++++- app/Console/Commands/CommEMSISend.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/CommBinkpSend.php b/app/Console/Commands/CommBinkpSend.php index 6f9f2e3..bb06df5 100644 --- a/app/Console/Commands/CommBinkpSend.php +++ b/app/Console/Commands/CommBinkpSend.php @@ -44,6 +44,11 @@ class CommBinkpSend extends Command $mo = Mailer::where('name',self::ID)->singleOrFail(); - return ($this->option('now')) ? Job::dispatchSync($ao,$mo) : Job::dispatch($ao,$mo); + if ($this->option('now')) + Job::dispatchSync($ao,$mo); + else + Job::dispatch($ao,$mo); + + return self::SUCCESS; } } diff --git a/app/Console/Commands/CommEMSISend.php b/app/Console/Commands/CommEMSISend.php index c34a8c1..e12ffc5 100644 --- a/app/Console/Commands/CommEMSISend.php +++ b/app/Console/Commands/CommEMSISend.php @@ -44,6 +44,11 @@ class CommEMSISend extends Command $mo = Mailer::where('name',self::ID)->singleOrFail(); - return ($this->option('now')) ? Job::dispatchSync($ao,$mo) : Job::dispatch($ao,$mo); + if ($this->option('now')) + Job::dispatchSync($ao,$mo); + else + Job::dispatch($ao,$mo); + + return self::SUCCESS; } }