From a774e967d3f02691cc761f183bdb5d64f8f732b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=B1=B1=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Mon, 4 Mar 2019 18:46:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96cli=E5=91=BD=E5=90=8D?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E5=90=8D=E4=B8=BAconsole?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 77 ++++++++--------------------------- app/{Cli => Console}/Http.php | 4 +- app/{Cli => Console}/Job.php | 4 +- app/Middleware/CORS.php | 2 - config/cli.php | 12 ------ config/console.php | 12 ++++++ config/di.php | 2 +- runtime/default/20190304.log | 14 +------ runtime/http.pid | 2 +- runtime/http_server.log | 2 + 10 files changed, 37 insertions(+), 94 deletions(-) rename app/{Cli => Console}/Http.php (97%) rename app/{Cli => Console}/Job.php (97%) delete mode 100644 config/cli.php create mode 100644 config/console.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2af57e1..6b853c1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,37 +2,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -267,12 +229,6 @@ - - - - - - @@ -383,18 +339,17 @@ - + - - - + @@ -703,13 +658,6 @@ - - - - - - - @@ -729,8 +677,8 @@ - - + + @@ -738,5 +686,12 @@ + + + + + + + \ No newline at end of file diff --git a/app/Cli/Http.php b/app/Console/Http.php similarity index 97% rename from app/Cli/Http.php rename to app/Console/Http.php index c8b2e8c..0a02c83 100644 --- a/app/Cli/Http.php +++ b/app/Console/Http.php @@ -1,5 +1,5 @@ getResponse(); $request = $context->getRequest(); // 请求方法 diff --git a/config/cli.php b/config/cli.php deleted file mode 100644 index bf26959..0000000 --- a/config/cli.php +++ /dev/null @@ -1,12 +0,0 @@ - \Star\Cli\Http::class - ], - [ - 'class' => \Star\Cli\Job::class - ] -]; \ No newline at end of file diff --git a/config/console.php b/config/console.php new file mode 100644 index 0000000..555dfcc --- /dev/null +++ b/config/console.php @@ -0,0 +1,12 @@ + \Star\Console\Http::class + ], + [ + 'class' => \Star\Console\Job::class + ] +]; \ No newline at end of file diff --git a/config/di.php b/config/di.php index 7ef78ea..7ce5341 100644 --- a/config/di.php +++ b/config/di.php @@ -7,7 +7,7 @@ // cli组件配置 $di->setShared('config.cli', function () { - return require(CONFIG_PATH . '/cli.php'); + return require(CONFIG_PATH . '/console.php'); }); $di->setShared('config.middleware', function () { diff --git a/runtime/default/20190304.log b/runtime/default/20190304.log index a620712..279ccdc 100644 --- a/runtime/default/20190304.log +++ b/runtime/default/20190304.log @@ -1,13 +1 @@ -2019-03-04 18:14:21 | CRITICAL | 2450 | 5c7cfa79e3663 | 1551694461.93 | Error - type:1 - file:/vagrant/app/Util/ThrowExceptionHandler.php - line:130 - msg:Uncaught Error: Call to a member function log() on null in /vagrant/app/Util/ThrowExceptionHandler.php:130 -Stack trace: -#0 /vagrant/app/Util/ThrowExceptionHandler.php(117): Star\Util\ThrowExceptionHandler::report('critical', Array) -#1 /vagrant/app/Util/HttpServer.php(87): Star\Util\ThrowExceptionHandler::uncaught(Object(Error)) -#2 {main} - thrown -2019-03-04 18:15:53 | notice | 2463 | 5c7cfad76249b | 1551694553.823 | {"message":"Undefined variable: data","code":8,"line":25,"class":"Bee\\Error\\Notice","file":"\/vagrant\/app\/Middleware\/CORS.php","args":[],"type":"error"} -2019-03-04 18:21:18 | CRITICAL | 2475 | 5c7cfc1b92d2c | 1551694878.156 | Error - type:1 - file:/vagrant/app/Util/ThrowExceptionHandler.php - line:135 - msg:Uncaught Error: Call to a member function log() on null in /vagrant/app/Util/ThrowExceptionHandler.php:135 -Stack trace: -#0 /vagrant/app/Util/ThrowExceptionHandler.php(118): Star\Util\ThrowExceptionHandler::report('critical', Array) -#1 /vagrant/app/Util/HttpServer.php(87): Star\Util\ThrowExceptionHandler::uncaught(Object(Error)) -#2 {main} - thrown +2019-03-04 18:37:28 | notice | 2512 | 5c7cffe2e3018 | 1551695848.625 | {"message":"Undefined variable: data","code":8,"line":25,"class":"Bee\\Error\\Notice","file":"\/vagrant\/app\/Middleware\/CORS.php","args":[],"type":"error"} diff --git a/runtime/http.pid b/runtime/http.pid index 4f77648..e73d010 100644 --- a/runtime/http.pid +++ b/runtime/http.pid @@ -1 +1 @@ -2489 \ No newline at end of file +2513 \ No newline at end of file diff --git a/runtime/http_server.log b/runtime/http_server.log index 74b5368..dff02ba 100644 --- a/runtime/http_server.log +++ b/runtime/http_server.log @@ -170,3 +170,5 @@ Stack trace: thrown in /vagrant/app/Util/ThrowExceptionHandler.php on line 135 [2019-03-04 10:21:18 $2477.0] WARNING swManager_check_exit_status: worker#0 abnormal exit, status=255, signal=0 [2019-03-04 10:22:43 #2476.1] NOTICE Server is shutdown now. +[2019-03-04 10:37:11 #2489.1] NOTICE Server is shutdown now. +[2019-03-04 10:37:22 #2501.1] NOTICE Server is shutdown now.