From 151f7fc544fd7711499512b736b30036dfaa5bc0 Mon Sep 17 00:00:00 2001 From: Kieran Date: Tue, 16 Jan 2024 15:06:40 +0000 Subject: [PATCH] Add exit code to horizon:forget command (#1370) --- src/Console/ForgetFailedCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Console/ForgetFailedCommand.php b/src/Console/ForgetFailedCommand.php index 7e850238..9ab3da15 100644 --- a/src/Console/ForgetFailedCommand.php +++ b/src/Console/ForgetFailedCommand.php @@ -24,7 +24,7 @@ class ForgetFailedCommand extends Command /** * Execute the console command. * - * @return void + * @return int|null */ public function handle(JobRepository $repository) { @@ -34,6 +34,8 @@ public function handle(JobRepository $repository) $this->info('Failed job deleted successfully!'); } else { $this->error('No failed job matches the given ID.'); + + return 1; } } }