From dd6f64d87fc510aac7b9eab4dc5758224e6c35d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 2 Mar 2021 13:49:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Application.php | 12 +++++------- System/Error/Logger.php | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/System/Application.php b/System/Application.php index a5dc2a57..c9bc32fe 100644 --- a/System/Application.php +++ b/System/Application.php @@ -112,14 +112,12 @@ class Application extends BaseApplication fire(Event::SERVER_BEFORE_START); - run(function () use ($argv) { - $this->set('input', $argv); + $this->set('input', $argv); - $manager = Snowflake::app()->get('console'); - $manager->setParameters($argv); - $class = $manager->search(); - response()->send($manager->execCommand($class)); - }); + $manager = Snowflake::app()->get('console'); + $manager->setParameters($argv); + $class = $manager->search(); + response()->send($manager->execCommand($class)); } catch (\Throwable $exception) { response()->send(implode("\n", [ 'Msg: ' . $exception->getMessage(), diff --git a/System/Error/Logger.php b/System/Error/Logger.php index 01887df9..31bdca64 100644 --- a/System/Error/Logger.php +++ b/System/Error/Logger.php @@ -168,10 +168,10 @@ class Logger extends Component $files = glob(storage(null, $dirName) . '/*'); if (count($files) >= 15) { $command = 'find ' . storage(null, $dirName) . '/ -mtime +15 -name "*.log" -exec rm -rf {} \;'; - if (Context::inCoroutine()) - Coroutine\System::exec($command); - else - exec($command); +// if (Context::inCoroutine()) +// Coroutine\System::exec($command); +// else +// exec($command); } }