This commit is contained in:
2021-04-27 19:10:36 +08:00
parent 2209997504
commit 0485a1d95f
3 changed files with 0 additions and 40 deletions
-1
View File
@@ -298,7 +298,6 @@ abstract class Pool extends Component
if (!$this->_items[$name]->isFull()) {
$this->_items[$name]->push($client);
}
$this->remove($name);
}
-28
View File
@@ -159,26 +159,10 @@ class Connection extends Pool
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$link->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
$link->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING);
// $this->printClients($config['cds'], '', '');
// $this->increment($name);
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 $isMaster
@@ -220,15 +204,6 @@ class Connection extends Pool
}
/**
* @param $coroutineName
*/
public function remove($coroutineName)
{
Context::remove($coroutineName);
}
/**
* @param string $name
* @param mixed $client
@@ -262,9 +237,6 @@ class Connection extends Pool
public function disconnect($coroutineName, $isMaster = false)
{
$coroutineName = $this->name($coroutineName, $isMaster);
if ($this->hasClient($coroutineName)) {
$this->remove($coroutineName);
}
$this->clean($coroutineName);
}
-11
View File
@@ -102,7 +102,6 @@ class Redis extends Pool
}
$this->push($coroutineName, Context::getContext($coroutineName));
$this->remove($coroutineName);
$this->lastTime = time();
}
@@ -117,20 +116,10 @@ class Redis extends Pool
$coroutineName = $this->name('redis', 'redis:' . $name, $isMaster);
if (Context::hasContext($coroutineName)) {
$this->decrement($coroutineName);
$this->remove($coroutineName);
}
$this->flush(0);
}
/**
* @param $coroutineName
*/
public function remove(string $coroutineName)
{
Context::remove($coroutineName);
}
/**
* @param string $name
* @param mixed $client