From 5a90408a7d5015224ea747e61efc5f1e755791d1 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 10 Jan 2020 12:16:12 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 ++++---- vendor/composer/installed.json | 8 ++++---- vendor/services.php | 2 +- .../think-library/src/service/QueueService.php | 11 ++++++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/composer.lock b/composer.lock index f789444bf..33070b2c9 100644 --- a/composer.lock +++ b/composer.lock @@ -909,12 +909,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "a644ee8cd994cabbbdfae43ab43557bb91cf5705" + "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a644ee8cd994cabbbdfae43ab43557bb91cf5705", - "reference": "a644ee8cd994cabbbdfae43ab43557bb91cf5705", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a", + "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a", "shasum": "", "mirrors": [ { @@ -958,7 +958,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "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", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 32fdcc6e8..c9bf5f2a1 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -935,12 +935,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "a644ee8cd994cabbbdfae43ab43557bb91cf5705" + "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/a644ee8cd994cabbbdfae43ab43557bb91cf5705", - "reference": "a644ee8cd994cabbbdfae43ab43557bb91cf5705", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a", + "reference": "bb619fa1955cc2a8ce8ae7dea4d6787149a9ac2a", "shasum": "", "mirrors": [ { @@ -956,7 +956,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2020-01-10T04:03:27+00:00", + "time": "2020-01-10T04:14:42+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index 3a221b11e..a7c2fd756 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/service/QueueService.php b/vendor/zoujingli/think-library/src/service/QueueService.php index a7eaeaf30..4a54ebeed 100644 --- a/vendor/zoujingli/think-library/src/service/QueueService.php +++ b/vendor/zoujingli/think-library/src/service/QueueService.php @@ -65,8 +65,8 @@ class QueueService extends Service $this->code = $code; $this->queue = $this->app->db->name('SystemQueue')->where(['code' => $this->code])->find(); if (empty($this->queue)) { - $this->app->log->error(__METHOD__ . " Qeueu initialize failed, Queue {$code} not found."); - throw new \think\Exception("Queue {$code} not found."); + $this->app->log->error("Qeueu initialize failed, Queue {$code} not found."); + throw new \think\Exception("Qeueu initialize failed, Queue {$code} not found."); } $this->code = $this->queue['code']; $this->title = $this->queue['title']; @@ -96,11 +96,12 @@ class QueueService extends Service public function reset($wait = 0) { 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!"); } - $this->app->db->name('SystemQueue')->where(['code' => $this->code])->strict(false)->failException(true)->update([ - 'exec_pid' => '0', 'exec_time' => time() + $wait, 'attempts' => $this->app->db->raw('attempts+1'), 'status' => '1', + $map = ['code' => $this->code]; + $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); }