ComposerUpdate

This commit is contained in:
Anyon 2020-04-28 09:49:44 +08:00
parent d6f9508085
commit a2be78f3e8
8 changed files with 13 additions and 19 deletions

8
composer.lock generated
View File

@ -909,12 +909,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "1d4b617db91e31cbd02b81268651dd93f5b66e87" "reference": "373e7587a6ade11254892b63e431cb57498f8fa3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1d4b617db91e31cbd02b81268651dd93f5b66e87", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/373e7587a6ade11254892b63e431cb57498f8fa3",
"reference": "1d4b617db91e31cbd02b81268651dd93f5b66e87", "reference": "373e7587a6ade11254892b63e431cb57498f8fa3",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -958,7 +958,7 @@
], ],
"description": "ThinkPHP v6.0 Development Library", "description": "ThinkPHP v6.0 Development Library",
"homepage": "http://framework.thinkadmin.top", "homepage": "http://framework.thinkadmin.top",
"time": "2020-04-26T06:36:23+00:00" "time": "2020-04-26T09:48:50+00:00"
}, },
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",

View File

@ -935,12 +935,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "1d4b617db91e31cbd02b81268651dd93f5b66e87" "reference": "373e7587a6ade11254892b63e431cb57498f8fa3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/1d4b617db91e31cbd02b81268651dd93f5b66e87", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/373e7587a6ade11254892b63e431cb57498f8fa3",
"reference": "1d4b617db91e31cbd02b81268651dd93f5b66e87", "reference": "373e7587a6ade11254892b63e431cb57498f8fa3",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -956,7 +956,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2020-04-26T06:36:23+00:00", "time": "2020-04-26T09:48:50+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"think": { "think": {

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php <?php
// This file is automatically generated at:2020-04-26 14:47:02 // This file is automatically generated at:2020-04-28 09:49:18
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -28,7 +28,7 @@ use think\db\Query;
abstract class Helper abstract class Helper
{ {
/** /**
* 当前应用容器 * 应用容器
* @var App * @var App
*/ */
public $app; public $app;
@ -40,7 +40,7 @@ abstract class Helper
public $query; public $query;
/** /**
* 当前控制器实例 * 控制器实例
* @var Controller * @var Controller
*/ */
public $controller; public $controller;

View File

@ -54,6 +54,5 @@ class Repair extends Command
$this->setQueueProgress(2, "[{$stridx}] 正在修复数据表 {$table}", $used / $total * 100); $this->setQueueProgress(2, "[{$stridx}] 正在修复数据表 {$table}", $used / $total * 100);
$this->app->db->query("REPAIR TABLE `{$table}`"); $this->app->db->query("REPAIR TABLE `{$table}`");
} }
$this->setQueueMessage(3, '数据库修复完成!');
} }
} }

View File

@ -66,8 +66,6 @@ class CleanQueue extends Queue
'status' => '4', 'exec_desc' => '任务执行超时,已自动标识为失败!', 'status' => '4', 'exec_desc' => '任务执行超时,已自动标识为失败!',
]); ]);
$this->setQueueProgress(2, "处理 {$count2} 条超时间任务成功", 100); $this->setQueueProgress(2, "处理 {$count2} 条超时间任务成功", 100);
// 返回消息到任务状态描述
$this->setQueueMessage(3, "共清理 {$count1} 条 + 无响应 {$count2}");
} }
} }
} }

View File

@ -34,7 +34,6 @@ class CodeExtend
$numbs = '0123456789'; $numbs = '0123456789';
$chars = 'abcdefghijklmnopqrstuvwxyz'; $chars = 'abcdefghijklmnopqrstuvwxyz';
if (intval($type) === 1) $chars = $numbs; if (intval($type) === 1) $chars = $numbs;
if (intval($type) === 2) $chars = "{$chars}";
if (intval($type) === 3) $chars = "{$numbs}{$chars}"; if (intval($type) === 3) $chars = "{$numbs}{$chars}";
$string = $prefix . $chars[rand(1, strlen($chars) - 1)]; $string = $prefix . $chars[rand(1, strlen($chars) - 1)];
if (isset($chars)) while (strlen($string) < $size) { if (isset($chars)) while (strlen($string) < $size) {

View File

@ -68,8 +68,7 @@ class QueueService extends Service
$this->app->log->error("Qeueu initialize failed, Queue {$code} not found."); $this->app->log->error("Qeueu initialize failed, Queue {$code} not found.");
throw new \think\admin\Exception("Qeueu initialize failed, Queue {$code} not found."); throw new \think\admin\Exception("Qeueu initialize failed, Queue {$code} not found.");
} }
$this->code = $this->queue['code']; list($this->code, $this->title) = [$this->queue['code'], $this->queue['title']];
$this->title = $this->queue['title'];
$this->data = json_decode($this->queue['exec_data'], true) ?: []; $this->data = json_decode($this->queue['exec_data'], true) ?: [];
} }
return $this; return $this;
@ -99,8 +98,7 @@ class QueueService extends Service
$this->app->log->error("Qeueu reset failed, Queue {$this->code} data cannot be empty!"); $this->app->log->error("Qeueu reset failed, Queue {$this->code} data cannot be empty!");
throw new \think\admin\Exception("Qeueu reset failed, Queue {$this->code} data cannot be empty!"); throw new \think\admin\Exception("Qeueu reset failed, Queue {$this->code} data cannot be empty!");
} }
$map = ['code' => $this->code]; $this->app->db->name('SystemQueue')->where(['code' => $this->code])->strict(false)->failException(true)->update([
$this->app->db->name('SystemQueue')->where($map)->strict(false)->failException(true)->update([
'exec_pid' => '0', 'exec_time' => time() + $wait, 'status' => '1', 'exec_pid' => '0', 'exec_time' => time() + $wait, 'status' => '1',
]); ]);
return $this->initialize($this->code); return $this->initialize($this->code);