改名
This commit is contained in:
@@ -298,7 +298,6 @@ abstract class Pool extends Component
|
|||||||
if (!$this->_items[$name]->isFull()) {
|
if (!$this->_items[$name]->isFull()) {
|
||||||
$this->_items[$name]->push($client);
|
$this->_items[$name]->push($client);
|
||||||
}
|
}
|
||||||
$this->remove($name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -159,26 +159,10 @@ class Connection extends Pool
|
|||||||
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
$link->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
|
$link->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
|
||||||
$link->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING);
|
$link->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING);
|
||||||
|
|
||||||
// $this->printClients($config['cds'], '', '');
|
|
||||||
// $this->increment($name);
|
|
||||||
|
|
||||||
return $link;
|
return $link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $cds
|
|
||||||
* @param $coroutineName
|
|
||||||
* @param false $isBefore
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function printClients($cds, $coroutineName, $isBefore = false)
|
|
||||||
{
|
|
||||||
// $this->success('create client connect ' . $cds);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $coroutineName
|
* @param $coroutineName
|
||||||
* @param $isMaster
|
* @param $isMaster
|
||||||
@@ -220,15 +204,6 @@ class Connection extends Pool
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $coroutineName
|
|
||||||
*/
|
|
||||||
public function remove($coroutineName)
|
|
||||||
{
|
|
||||||
Context::remove($coroutineName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param mixed $client
|
* @param mixed $client
|
||||||
@@ -262,9 +237,6 @@ class Connection extends Pool
|
|||||||
public function disconnect($coroutineName, $isMaster = false)
|
public function disconnect($coroutineName, $isMaster = false)
|
||||||
{
|
{
|
||||||
$coroutineName = $this->name($coroutineName, $isMaster);
|
$coroutineName = $this->name($coroutineName, $isMaster);
|
||||||
if ($this->hasClient($coroutineName)) {
|
|
||||||
$this->remove($coroutineName);
|
|
||||||
}
|
|
||||||
$this->clean($coroutineName);
|
$this->clean($coroutineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ class Redis extends Pool
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->push($coroutineName, Context::getContext($coroutineName));
|
$this->push($coroutineName, Context::getContext($coroutineName));
|
||||||
$this->remove($coroutineName);
|
|
||||||
$this->lastTime = time();
|
$this->lastTime = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,20 +116,10 @@ class Redis extends Pool
|
|||||||
$coroutineName = $this->name('redis', 'redis:' . $name, $isMaster);
|
$coroutineName = $this->name('redis', 'redis:' . $name, $isMaster);
|
||||||
if (Context::hasContext($coroutineName)) {
|
if (Context::hasContext($coroutineName)) {
|
||||||
$this->decrement($coroutineName);
|
$this->decrement($coroutineName);
|
||||||
|
|
||||||
$this->remove($coroutineName);
|
|
||||||
}
|
}
|
||||||
$this->flush(0);
|
$this->flush(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $coroutineName
|
|
||||||
*/
|
|
||||||
public function remove(string $coroutineName)
|
|
||||||
{
|
|
||||||
Context::remove($coroutineName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param mixed $client
|
* @param mixed $client
|
||||||
|
|||||||
Reference in New Issue
Block a user