diff --git a/kiri-engine/Application.php b/kiri-engine/Application.php index cab743f4..1051fcd8 100644 --- a/kiri-engine/Application.php +++ b/kiri-engine/Application.php @@ -222,6 +222,7 @@ class Application extends BaseApplication } + /** * @param Command $class * @param $input diff --git a/kiri-gii/Gii.php b/kiri-gii/Gii.php index cb5272ec..8cebc954 100644 --- a/kiri-gii/Gii.php +++ b/kiri-gii/Gii.php @@ -12,8 +12,6 @@ namespace Gii; use Database\Connection; use Database\Db; use Exception; -use Kiri\Redis\Redis; -use Kiri; use Symfony\Component\Console\Input\InputInterface; /** diff --git a/kiri-gii/GiiBase.php b/kiri-gii/GiiBase.php index e7652138..124d5fae 100644 --- a/kiri-gii/GiiBase.php +++ b/kiri-gii/GiiBase.php @@ -11,6 +11,7 @@ use Kiri\Core\Json; use ReflectionClass; use ReflectionException; use Symfony\Component\Console\Input\InputInterface; +use const APP_PATH; /** * Class GiiBase diff --git a/kiri-gii/GiiCommand.php b/kiri-gii/GiiCommand.php index 3a86f40f..3b8584da 100644 --- a/kiri-gii/GiiCommand.php +++ b/kiri-gii/GiiCommand.php @@ -5,9 +5,9 @@ namespace Gii; use Exception; +use Kiri; use Kiri\Abstracts\Config; use Kiri\Exception\ConfigException; -use Kiri; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; diff --git a/kiri-gii/GiiController.php b/kiri-gii/GiiController.php index 8a0f6729..823d2e71 100644 --- a/kiri-gii/GiiController.php +++ b/kiri-gii/GiiController.php @@ -5,8 +5,9 @@ declare(strict_types=1); namespace Gii; use Exception; -use ReflectionException; use Kiri; +use ReflectionException; +use function logger; /** * Class GiiController diff --git a/kiri-gii/GiiMiddleware.php b/kiri-gii/GiiMiddleware.php index db2c58c5..7c195bb2 100644 --- a/kiri-gii/GiiMiddleware.php +++ b/kiri-gii/GiiMiddleware.php @@ -7,6 +7,7 @@ namespace Gii; use Exception; use Kiri; +use const APP_PATH; /** * Class GiiMiddleware diff --git a/kiri-gii/GiiModel.php b/kiri-gii/GiiModel.php index fd420d97..e5f3e39b 100644 --- a/kiri-gii/GiiModel.php +++ b/kiri-gii/GiiModel.php @@ -5,10 +5,10 @@ declare(strict_types=1); namespace Gii; use Database\Db; -use Database\Model; use Exception; -use ReflectionException; use Kiri; +use ReflectionException; +use function logger; /** * Class GiiModel diff --git a/kiri-gii/GiiProviders.php b/kiri-gii/GiiProviders.php index 571c008f..dcdb7f26 100644 --- a/kiri-gii/GiiProviders.php +++ b/kiri-gii/GiiProviders.php @@ -6,9 +6,9 @@ namespace Gii; use Exception; +use Kiri; use Kiri\Abstracts\Providers; use Kiri\Application; -use Kiri; /** * Class DatabasesProviders diff --git a/kiri-gii/GiiRpcClient.php b/kiri-gii/GiiRpcClient.php index bc81a532..57b79f4b 100644 --- a/kiri-gii/GiiRpcClient.php +++ b/kiri-gii/GiiRpcClient.php @@ -6,6 +6,7 @@ namespace Gii; use Exception; use Kiri; +use const APP_PATH; /** * Class GiiRpcClient diff --git a/kiri-gii/GiiRpcService.php b/kiri-gii/GiiRpcService.php index cca5f488..d1c8931e 100644 --- a/kiri-gii/GiiRpcService.php +++ b/kiri-gii/GiiRpcService.php @@ -6,6 +6,7 @@ namespace Gii; use Exception; use Kiri; +use const APP_PATH; /** * Class GiiRpcClient diff --git a/kiri-gii/GiiTask.php b/kiri-gii/GiiTask.php index bf6bd87d..f0168ff4 100644 --- a/kiri-gii/GiiTask.php +++ b/kiri-gii/GiiTask.php @@ -6,6 +6,7 @@ namespace Gii; use Exception; use Kiri; +use const APP_PATH; /** * Class GiiModel diff --git a/p.php b/p.php index e3bf368e..2aa3c8f4 100644 --- a/p.php +++ b/p.php @@ -1,90 +1,5 @@ write("11111"); -// -// after($process); -// }); -//} -// -// -//function read(Process $process, Coroutine\Channel $channel) -//{ -// $data = $process->read(); -// -// $channel->push($data); -// -// var_dump($channel->length()); -// -// read($process, $channel); -//} -// -//$process = new Process(function (Process $process) { -// -// $array = new Coroutine\Channel(9999999); -// -// $barrier = Barrier::make(); -// -// Coroutine::create('read', $process, $array); -// Coroutine::create(function (Coroutine\Channel $channel) { -// var_dump(1111); -// function ch(Coroutine\Channel $channel) { -// $data = $channel->pop(); -// -// var_dump($data); -// -// ch($channel); -// }; -// ch($channel); -// }, $array); -// Barrier::wait($barrier); -//}, null, SWOOLE_UNIX_STREAM, true); -//$process->start(); -// -//Coroutine\run(function () use ($process) { -// after($process); -//}); - -var_dump(json_encode([ - "Datacenter" => "dc1", - "Node" => "iz8vbi3edjyskl7kpuwudqz", - "SkipNodeUpdate" => FALSE, - "Service" => [ - "ID" => "redis1", - "Service" => "FriendRpcService", - "Address" => "172.26.221.211", - "TaggedAddresses" => [ - "lan" => [ - "address" => "127.0.0.1", - "port" => 9627, - ], - "wan" => [ - "address" => "172.26.221.211", - "port" => 9627, - ], - ], - "Meta" => [ - "redis_version" => "4.0", - ], - "Port" => 9627, - ], - "Check" => [ - "Node" => "iz8vbi3edjyskl7kpuwudqz", - "CheckId" => "service:redis1", - "Name" => "Redis health check", - "Notes" => "Script based health check", - "Status" => "passing", - "ServiceID" => "redis1", - "Definition" => [ - "Http" => "http://172.26.221.211:9627", - "Interval" => "5s", - "Timeout" => "1s", - "DeregisterCriticalServiceAfter" => "30s", - ], - ], -])); +var_dump(30 / 60); diff --git a/socket.html b/socket.html index aca95871..fbe8731c 100644 --- a/socket.html +++ b/socket.html @@ -8,6 +8,8 @@ word-break: break-all; white-space: pre-wrap; word-wrap: break-word; + overflow-y: scroll; + overflow: hidden; } @@ -48,7 +50,7 @@ } function connect() { - sock = new WebSocket('ws://localhost:8080/websocket'); + sock = new WebSocket('ws://127.0.0.1:9528/222'); sock.onopen = function () { if (tick) { clearInterval(tick)