From ef3c6ce7f3be95e926c701edc53a59dc1b41a8fc Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 14 Aug 2020 15:03:16 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 ++++---- vendor/composer/installed.json | 8 ++++---- vendor/services.php | 2 +- vendor/zoujingli/think-library/src/command/Version.php | 2 +- .../zoujingli/think-library/src/service/QueueService.php | 9 +++++++-- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/composer.lock b/composer.lock index 81754f960..a7bdc9a01 100644 --- a/composer.lock +++ b/composer.lock @@ -937,12 +937,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "032fd6e5bd304a2fd7e8d964c2e125db55d4e9db" + "reference": "194317296e5d7483727d895670d96d73b5da0167" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/032fd6e5bd304a2fd7e8d964c2e125db55d4e9db", - "reference": "032fd6e5bd304a2fd7e8d964c2e125db55d4e9db", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/194317296e5d7483727d895670d96d73b5da0167", + "reference": "194317296e5d7483727d895670d96d73b5da0167", "shasum": "", "mirrors": [ { @@ -986,7 +986,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://thinkadmin.top", - "time": "2020-08-14T05:29:39+00:00" + "time": "2020-08-14T06:51:29+00:00" }, { "name": "zoujingli/wechat-developer", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index bb35f0667..d0bd4a2b2 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -963,12 +963,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "44e1ec7dbb25d5304da0f599bfcfc667cab7d61f" + "reference": "194317296e5d7483727d895670d96d73b5da0167" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/44e1ec7dbb25d5304da0f599bfcfc667cab7d61f", - "reference": "44e1ec7dbb25d5304da0f599bfcfc667cab7d61f", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/194317296e5d7483727d895670d96d73b5da0167", + "reference": "194317296e5d7483727d895670d96d73b5da0167", "shasum": "", "mirrors": [ { @@ -984,7 +984,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2020-08-14T05:34:24+00:00", + "time": "2020-08-14T06:51:29+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 01876e882..c4b9642e9 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\admin\\Library', diff --git a/vendor/zoujingli/think-library/src/command/Version.php b/vendor/zoujingli/think-library/src/command/Version.php index f7f36bc9d..766a24905 100644 --- a/vendor/zoujingli/think-library/src/command/Version.php +++ b/vendor/zoujingli/think-library/src/command/Version.php @@ -38,7 +38,7 @@ class Version extends Command */ protected function execute(Input $input, Output $output) { - $output->writeln('ThinkLib ' . $this->process->version()); $output->writeln('ThinkPHP ' . $this->app->version()); + $output->writeln('ThinkLIB ' . $this->process->version()); } } \ No newline at end of file diff --git a/vendor/zoujingli/think-library/src/service/QueueService.php b/vendor/zoujingli/think-library/src/service/QueueService.php index abb4c22f6..6de66e49b 100644 --- a/vendor/zoujingli/think-library/src/service/QueueService.php +++ b/vendor/zoujingli/think-library/src/service/QueueService.php @@ -154,6 +154,7 @@ class QueueService extends Service */ public function progress($status = null, $message = null, $progress = null) { + $cachefile = "queue_{$this->code}_progress"; if (is_numeric($status) && intval($status) === 3) { if (!is_numeric($progress)) $progress = '100.00'; if (is_null($message)) $message = '>>> 任务已经完成 <<<'; @@ -163,7 +164,11 @@ class QueueService extends Service if (is_null($message)) $message = '>>> 任务执行失败 <<<'; } try { - $data = $this->app->cache->get("queue_{$this->code}_progress", [ + // 文件缓存时,重置 opcache 缓存 + if (function_exists('opcache_invalidate') && strtolower($this->app->cache->getDefaultDriver()) === 'file') { + @opcache_invalidate($this->app->cache->getCacheKey($cachefile), true); + } + $data = $this->app->cache->get($cachefile, [ 'code' => $this->code, 'status' => $status, 'message' => $message, 'progress' => $progress, 'history' => [], ]); } catch (\Exception|\Error $exception) { @@ -186,7 +191,7 @@ class QueueService extends Service if (count($data['history']) > 10) { $data['history'] = array_slice($data['history'], -10); } - $this->app->cache->set("queue_{$this->code}_progress", $data, 86400); + $this->app->cache->set($cachefile, $data, 86400); } return $data; }