modify plugin name

This commit is contained in:
2022-02-25 18:30:59 +08:00
parent 56c4f42b97
commit d67bbd69ca
+5 -5
View File
@@ -104,11 +104,11 @@ class Connection extends Component
$minx = Config::get('databases.pool.min', 1); $minx = Config::get('databases.pool.min', 1);
/** @var PDO $connections */ /** @var PDO $connections */
$connections = $this->pool->get($coroutineName, $this->create($coroutineName, $config), $minx); $pdo = $this->pool->get($coroutineName, static function () use ($coroutineName, $config) {
if (Context::hasContext('begin_' . $coroutineName)) { return Kiri::getDi()->create(PDO::class, [$config]);
$connections->beginTransaction(); }, $minx);
}
return $connections; return Context::setContext($config['cds'], $pdo);
} }