ComposerUpdate

This commit is contained in:
Anyon 2020-01-10 12:16:12 +08:00
parent 254480a8bb
commit 5a90408a7d
4 changed files with 15 additions and 14 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": "a644ee8cd994cabbbdfae43ab43557bb91cf5705" "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a644ee8cd994cabbbdfae43ab43557bb91cf5705", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a",
"reference": "a644ee8cd994cabbbdfae43ab43557bb91cf5705", "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a",
"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-01-10T04:03:27+00:00" "time": "2020-01-10T04:14:42+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": "a644ee8cd994cabbbdfae43ab43557bb91cf5705" "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a644ee8cd994cabbbdfae43ab43557bb91cf5705", "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a",
"reference": "a644ee8cd994cabbbdfae43ab43557bb91cf5705", "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
@ -956,7 +956,7 @@
"ext-json": "*", "ext-json": "*",
"topthink/framework": "^6.0" "topthink/framework": "^6.0"
}, },
"time": "2020-01-10T04:03:27+00:00", "time": "2020-01-10T04:14:42+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-01-10 12:09:43 // This file is automatically generated at:2020-01-10 12:15:56
declare (strict_types = 1); declare (strict_types = 1);
return array ( return array (
0 => 'think\\app\\Service', 0 => 'think\\app\\Service',

View File

@ -65,8 +65,8 @@ class QueueService extends Service
$this->code = $code; $this->code = $code;
$this->queue = $this->app->db->name('SystemQueue')->where(['code' => $this->code])->find(); $this->queue = $this->app->db->name('SystemQueue')->where(['code' => $this->code])->find();
if (empty($this->queue)) { if (empty($this->queue)) {
$this->app->log->error(__METHOD__ . " Qeueu initialize failed, Queue {$code} not found."); $this->app->log->error("Qeueu initialize failed, Queue {$code} not found.");
throw new \think\Exception("Queue {$code} not found."); throw new \think\Exception("Qeueu initialize failed, Queue {$code} not found.");
} }
$this->code = $this->queue['code']; $this->code = $this->queue['code'];
$this->title = $this->queue['title']; $this->title = $this->queue['title'];
@ -96,11 +96,12 @@ class QueueService extends Service
public function reset($wait = 0) public function reset($wait = 0)
{ {
if (empty($this->queue)) { if (empty($this->queue)) {
$this->app->log->error(__METHOD__ . " 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\Exception("Qeueu reset failed, Queue {$this->code} data cannot be empty!"); throw new \think\Exception("Qeueu reset failed, Queue {$this->code} data cannot be empty!");
} }
$this->app->db->name('SystemQueue')->where(['code' => $this->code])->strict(false)->failException(true)->update([ $map = ['code' => $this->code];
'exec_pid' => '0', 'exec_time' => time() + $wait, 'attempts' => $this->app->db->raw('attempts+1'), 'status' => '1', $this->app->db->name('SystemQueue')->where($map)->strict(false)->failException(true)->update([
'exec_pid' => '0', 'exec_time' => time() + $wait, 'status' => '1',
]); ]);
return $this->initialize($this->code); return $this->initialize($this->code);
} }