mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
b08e7ee83c
commit
ef3c6ce7f3
8
composer.lock
generated
8
composer.lock
generated
@ -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",
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -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": {
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-08-14 13:37:19
|
||||
// This file is automatically generated at:2020-08-14 15:03:14
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user