改名
This commit is contained in:
@@ -317,8 +317,8 @@ class Connection extends Component
|
|||||||
public function disconnect()
|
public function disconnect()
|
||||||
{
|
{
|
||||||
$connections = $this->connections();
|
$connections = $this->connections();
|
||||||
$connections->disconnect($this->cds);
|
$connections->disconnect($this->cds, true);
|
||||||
$connections->disconnect($this->slaveConfig['cds']);
|
$connections->disconnect($this->slaveConfig['cds'], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,8 +35,9 @@ abstract class Callback extends HttpService
|
|||||||
try {
|
try {
|
||||||
fire(Event::SYSTEM_RESOURCE_CLEAN);
|
fire(Event::SYSTEM_RESOURCE_CLEAN);
|
||||||
|
|
||||||
|
\logger()->insert();
|
||||||
|
|
||||||
Snowflake::clearProcessId($server->worker_pid);
|
Snowflake::clearProcessId($server->worker_pid);
|
||||||
Timer::clearAll();
|
|
||||||
|
|
||||||
$logger = Snowflake::app()->getLogger();
|
$logger = Snowflake::app()->getLogger();
|
||||||
$logger->write($this->_MESSAGE[$message] . $worker_id);
|
$logger->write($this->_MESSAGE[$message] . $worker_id);
|
||||||
|
|||||||
@@ -280,14 +280,15 @@ class Connection extends Pool
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $coroutineName
|
* @param $coroutineName
|
||||||
|
* @param bool $isMaster
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function disconnect($coroutineName)
|
public function disconnect($coroutineName, $isMaster = false)
|
||||||
{
|
{
|
||||||
if (!$this->hasClient($coroutineName)) {
|
$coroutineName = $this->name($coroutineName, $isMaster);
|
||||||
return;
|
if ($this->hasClient($coroutineName)) {
|
||||||
}
|
|
||||||
$this->remove($coroutineName);
|
$this->remove($coroutineName);
|
||||||
|
}
|
||||||
$this->clean($coroutineName);
|
$this->clean($coroutineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,13 +104,11 @@ class Redis extends Pool
|
|||||||
{
|
{
|
||||||
$name = $config['host'] . ':' . $config['prefix'] . ':' . $config['databases'];
|
$name = $config['host'] . ':' . $config['prefix'] . ':' . $config['databases'];
|
||||||
$coroutineName = $this->name('redis', 'redis:' . $name, $isMaster);
|
$coroutineName = $this->name('redis', 'redis:' . $name, $isMaster);
|
||||||
if (!Context::hasContext($coroutineName)) {
|
if (Context::hasContext($coroutineName)) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->desc($coroutineName);
|
$this->desc($coroutineName);
|
||||||
|
|
||||||
$this->remove($coroutineName);
|
$this->remove($coroutineName);
|
||||||
|
}
|
||||||
$this->clean($coroutineName);
|
$this->clean($coroutineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user