modify plugin name
This commit is contained in:
@@ -30,7 +30,7 @@ class Redis extends Component
|
|||||||
*/
|
*/
|
||||||
public function get(mixed $config, bool $isMaster = false): mixed
|
public function get(mixed $config, bool $isMaster = false): mixed
|
||||||
{
|
{
|
||||||
$coroutineName = $this->name('Redis:' . $config['host'], $isMaster);
|
$coroutineName = $config['host'];
|
||||||
if (Context::hasContext($coroutineName)) {
|
if (Context::hasContext($coroutineName)) {
|
||||||
return Context::getContext($coroutineName);
|
return Context::getContext($coroutineName);
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ class Redis extends Component
|
|||||||
*/
|
*/
|
||||||
public function release(array $config, bool $isMaster = false)
|
public function release(array $config, bool $isMaster = false)
|
||||||
{
|
{
|
||||||
$coroutineName = $this->name('Redis:' . $config['host'], $isMaster);
|
$coroutineName = $config['host'];
|
||||||
if (!Context::hasContext($coroutineName)) {
|
if (!Context::hasContext($coroutineName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -79,9 +79,8 @@ class Redis extends Component
|
|||||||
*/
|
*/
|
||||||
public function destroy(array $config, bool $isMaster = false)
|
public function destroy(array $config, bool $isMaster = false)
|
||||||
{
|
{
|
||||||
$coroutineName = $this->name('Redis:' . $config['host'], $isMaster);
|
$this->getPool()->clean($config['host']);
|
||||||
$this->getPool()->clean($coroutineName);
|
Context::remove($config['host']);
|
||||||
Context::remove($coroutineName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -92,8 +91,7 @@ class Redis extends Component
|
|||||||
*/
|
*/
|
||||||
public function connection_clear(array $config, bool $isMaster = false)
|
public function connection_clear(array $config, bool $isMaster = false)
|
||||||
{
|
{
|
||||||
$coroutineName = $this->name('Redis:' . $config['host'], $isMaster);
|
$this->getPool()->clean($config['host']);
|
||||||
$this->getPool()->clean($coroutineName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user