From 3a666bb6bea8c0c1f5f89a43b29a8040e2b381b5 Mon Sep 17 00:00:00 2001 From: butschster Date: Fri, 10 Jun 2022 10:30:16 +0400 Subject: [PATCH] Fixes problem with rendering error in worker --- src/Commands/ScheduleRunCommand.php | 2 +- src/Commands/ScheduleWorkCommand.php | 2 +- src/EveryMinuteCommandRunner.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/ScheduleRunCommand.php b/src/Commands/ScheduleRunCommand.php index b146bdd..11b51b3 100644 --- a/src/Commands/ScheduleRunCommand.php +++ b/src/Commands/ScheduleRunCommand.php @@ -31,7 +31,7 @@ public function perform( $this->info( \sprintf( - '[%s] Running scheduled job: %s', + '[%s] Running scheduled: `%s`', \date('c'), $job->getDescription() ?? $job->getSystemDescription() ) diff --git a/src/Commands/ScheduleWorkCommand.php b/src/Commands/ScheduleWorkCommand.php index 1bda426..376b63e 100644 --- a/src/Commands/ScheduleWorkCommand.php +++ b/src/Commands/ScheduleWorkCommand.php @@ -20,7 +20,7 @@ public function perform( $runner->run( 'schedule:run', function (string $message) { - $this->line($message, 'green'); + $this->writeln($message); }, function (string $message) { $this->error($message); diff --git a/src/EveryMinuteCommandRunner.php b/src/EveryMinuteCommandRunner.php index 271fcea..f4d7ac1 100644 --- a/src/EveryMinuteCommandRunner.php +++ b/src/EveryMinuteCommandRunner.php @@ -43,7 +43,7 @@ public function run(string $command, \Closure $onSuccess = null, \Closure $onErr } if (! empty($errorOutput)) { - $onError($output); + $onError($errorOutput); } if (! $execution->isRunning()) {