ComposerUpdate

This commit is contained in:
Anyon 2020-07-16 10:06:20 +08:00
parent 3fa9345d49
commit 612cfb6e31
5 changed files with 1553 additions and 13 deletions

8
composer.lock generated
View File

@ -929,12 +929,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "ad82946e618337bcf51eeadf29c0aa72b5ecac5b" "reference": "e60969c7e974c22953bb011a56d1d82e852b09f2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/ad82946e618337bcf51eeadf29c0aa72b5ecac5b", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/e60969c7e974c22953bb011a56d1d82e852b09f2",
"reference": "ad82946e618337bcf51eeadf29c0aa72b5ecac5b", "reference": "e60969c7e974c22953bb011a56d1d82e852b09f2",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -978,7 +978,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-07-05T06:30:42+00:00" "time": "2020-07-15T08:57:57+00:00"
}, },
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",

File diff suppressed because one or more lines are too long

View File

@ -955,12 +955,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/ThinkLibrary.git", "url": "https://github.com/zoujingli/ThinkLibrary.git",
"reference": "ad82946e618337bcf51eeadf29c0aa72b5ecac5b" "reference": "e60969c7e974c22953bb011a56d1d82e852b09f2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/ad82946e618337bcf51eeadf29c0aa72b5ecac5b", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/e60969c7e974c22953bb011a56d1d82e852b09f2",
"reference": "ad82946e618337bcf51eeadf29c0aa72b5ecac5b", "reference": "e60969c7e974c22953bb011a56d1d82e852b09f2",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -976,7 +976,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2020-07-05T06:30:42+00:00", "time": "2020-07-15T08:57:57+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-07-15 10:23:46 // This file is automatically generated at:2020-07-16 10:05:59
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -175,16 +175,13 @@ class Queue extends Command
/** /**
* 清理所有任务 * 清理所有任务
* @throws \think\admin\Exception * @throws \think\admin\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException * @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/ */
protected function cleanAction() protected function cleanAction()
{ {
// 清理 7 天前的历史任务记录 // 清理 7 天前的历史任务记录
$map = [['exec_time', '<', time() - 7 * 24 * 3600]]; $map = [['exec_time', '<', time() - 7 * 24 * 3600]];
$clear = $this->app->db->name($this->table)->where($map)->delete(); $clear = $this->app->db->name($this->table)->where($map)->delete();
$this->setQueueProgress("本次清理了 {$clear} 条历史任务记录");
// 标记超过 1 小时未完成的任务为失败状态,循环任务失败重置 // 标记超过 1 小时未完成的任务为失败状态,循环任务失败重置
$map1 = [['loops_time', '>', 0], ['status', '=', 4]]; // 执行失败的循环任务 $map1 = [['loops_time', '>', 0], ['status', '=', 4]]; // 执行失败的循环任务
$map2 = [['exec_time', '<', time() - 3600], ['status', '=', 2]]; // 执行超时的任务 $map2 = [['exec_time', '<', time() - 3600], ['status', '=', 2]]; // 执行超时的任务