Browse Source

SSDB

master
weigang 5 years ago
parent
commit
b2d2e1527f
  1. 12
      app/TaskWorker/SSDBTask.php

12
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;
}
}

Loading…
Cancel
Save