From 4e036d073607f83dbfae6157618c42051359e402 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 15 May 2020 15:42:49 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 ++++---- vendor/composer/installed.json | 8 ++++---- vendor/services.php | 2 +- .../think-library/src/command/Queue.php | 17 +++++++++-------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 11b6f6cf4..94eadd5da 100644 --- a/composer.lock +++ b/composer.lock @@ -915,12 +915,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "093c05394e9310edfa1b0d4d5d7ccda5f919ad74" + "reference": "8faeb22f7b2f9a279911b6497de1c6856b368eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/093c05394e9310edfa1b0d4d5d7ccda5f919ad74", - "reference": "093c05394e9310edfa1b0d4d5d7ccda5f919ad74", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8faeb22f7b2f9a279911b6497de1c6856b368eba", + "reference": "8faeb22f7b2f9a279911b6497de1c6856b368eba", "shasum": "", "mirrors": [ { @@ -964,7 +964,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2020-05-15T06:47:21+00:00" + "time": "2020-05-15T07:37:07+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 93c3d89e8..a1fbb6f45 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -941,12 +941,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "093c05394e9310edfa1b0d4d5d7ccda5f919ad74" + "reference": "8faeb22f7b2f9a279911b6497de1c6856b368eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/093c05394e9310edfa1b0d4d5d7ccda5f919ad74", - "reference": "093c05394e9310edfa1b0d4d5d7ccda5f919ad74", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8faeb22f7b2f9a279911b6497de1c6856b368eba", + "reference": "8faeb22f7b2f9a279911b6497de1c6856b368eba", "shasum": "", "mirrors": [ { @@ -962,7 +962,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2020-05-15T06:47:21+00:00", + "time": "2020-05-15T07:37:07+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 18ec227b3..2ea5d0a4b 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/command/Queue.php b/vendor/zoujingli/think-library/src/command/Queue.php index fa194e555..c00d0cf77 100644 --- a/vendor/zoujingli/think-library/src/command/Queue.php +++ b/vendor/zoujingli/think-library/src/command/Queue.php @@ -76,12 +76,12 @@ class Queue extends Command */ protected function webStopAction() { - $keyword = $this->process->think('run -p'); - if (count($result = $this->process->query($keyword)) < 1) { + $root = "{$this->app->getRootPath()}public" . DIRECTORY_SEPARATOR; + if (count($result = $this->process->query("-t {$root} {$root}router.php")) < 1) { $this->output->warning("There is no WebServer process to finish"); } else foreach ($result as $item) { $this->process->close($item['pid']); - $this->output->info("Sending end process {$item['pid']} signal succeeded"); + $this->output->writeln("Sending end process {$item['pid']} signal succeeded"); } } @@ -92,14 +92,15 @@ class Queue extends Command { $port = $this->input->getOption('port') ?: '80'; $host = $this->input->getOption('host') ?: '127.0.0.1'; - $command = $this->process->think("run -p {$port} -H {$host}"); + $root = "{$this->app->getRootPath()}public" . DIRECTORY_SEPARATOR; + $command = "php -S {$host}:{$port} -t {$root} {$root}router.php"; if (count($result = $this->process->query($command)) > 0) { if ($this->process->iswin()) { $this->process->exec("start http://{$host}:{$port}"); } $this->output->info("WebServer process {$result['0']['pid']} has started"); } else { - [$this->process->create($command), usleep(1000)]; + [$this->process->create($command), usleep(2000)]; if (count($result = $this->process->query($command)) > 0) { $this->output->info("WebServer process {$result['0']['pid']} started successfully"); if ($this->process->iswin()) { @@ -116,8 +117,8 @@ class Queue extends Command */ protected function webStatusAction() { - $command = $this->process->think("run -p"); - if (count($result = $this->process->query($command)) > 0) { + $root = "{$this->app->getRootPath()}public" . DIRECTORY_SEPARATOR; + if (count($result = $this->process->query("-t {$root} {$root}router.php")) > 0) { $this->output->info("WebServer process {$result[0]['pid']} running"); $this->output->write("># {$result[0]['cmd']}"); } else { @@ -135,7 +136,7 @@ class Queue extends Command $this->output->warning("There is no task process to finish"); } else foreach ($result as $item) { $this->process->close($item['pid']); - $this->output->info("Sending end process {$item['pid']} signal succeeded"); + $this->output->writeln("Sending end process {$item['pid']} signal succeeded"); } }