From b2d2e1527fdd594937dbb003905976739fb157d8 Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 15 Sep 2020 15:35:31 +0800 Subject: [PATCH] SSDB --- app/TaskWorker/SSDBTask.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/TaskWorker/SSDBTask.php b/app/TaskWorker/SSDBTask.php index fd4d451..3b949b5 100644 --- a/app/TaskWorker/SSDBTask.php +++ b/app/TaskWorker/SSDBTask.php @@ -14,9 +14,6 @@ class SSDBTask public $ss = null; - /** - * @Task - */ public function exec($method,...$args) { $result = $this->client()->__call($method,$args); @@ -32,14 +29,11 @@ class SSDBTask } protected function client(){ - if ($this->ss instanceof SimpleSSDB) { - return $this->ss; - } - $this->ss = new SimpleSSDB(env('SSDB_HOST'), env('SSDB_PORT')); - $this->ss->auth(env('SSDB_AUTH')); + $ss = new SimpleSSDB(env('SSDB_HOST'), env('SSDB_PORT')); + $ss->auth(env('SSDB_AUTH')); - return $this->ss; + return $ss; } }