BaseLoop different logger
This commit is contained in:
@ -44,10 +44,6 @@ class BaseLoop extends Console\Command\Command
|
||||
}
|
||||
$nextMinute = new DateTimeImmutable($start->format('Y-m-d H:i:00'));
|
||||
$nextMinute = $nextMinute->add(new \DateInterval('PT1M'));
|
||||
$this->logger->debug('Wait', [
|
||||
'start' => $start->format('Y-m-d H:i:s.u'),
|
||||
'nextMinute' => $nextMinute->format('Y-m-d H:i:s.u'),
|
||||
]);
|
||||
$diff = $nextMinute->getTimestamp() - $start->getTimestamp();
|
||||
if ($diff > 0) {
|
||||
$this->logger->debug("Waiting {$diff} seconds...");
|
||||
@ -66,6 +62,7 @@ class BaseLoop extends Console\Command\Command
|
||||
'command' => $commandName
|
||||
]);
|
||||
try {
|
||||
$this->logger->notice("Running commnand: {$commandName}");
|
||||
return $this->getApplication()->doRun($cmd, $output);
|
||||
} catch (Throwable $exception) {
|
||||
$this->logger->warning($exception);
|
||||
|
Reference in New Issue
Block a user