请求日志
This commit is contained in:
parent
0664016fe3
commit
92548a4ba6
|
|
@ -25,16 +25,16 @@ class DbCoroutineContext
|
||||||
// put 存数据到 list
|
// put 存数据到 list
|
||||||
public static function put(mixed $value): void
|
public static function put(mixed $value): void
|
||||||
{
|
{
|
||||||
// $val = self::get('startTrans');
|
$val = self::get('startTrans');
|
||||||
// if (!empty($val) && $val === true) {
|
if (!empty($val) && $val === true) {
|
||||||
// $value->startTrans();
|
$value->startTrans();
|
||||||
// }
|
}
|
||||||
// $cid = self::getCid();
|
$cid = self::getCid();
|
||||||
// if ($cid !== null) {
|
if ($cid !== null) {
|
||||||
// self::$list[$cid][] = $value;
|
self::$list[$cid][] = $value;
|
||||||
// } else {
|
} else {
|
||||||
// self::$globalList[] = $value;
|
self::$globalList[] = $value;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set 设置 key-value
|
// set 设置 key-value
|
||||||
|
|
@ -83,14 +83,6 @@ class DbCoroutineContext
|
||||||
|
|
||||||
public static function clearList()
|
public static function clearList()
|
||||||
{
|
{
|
||||||
foreach (self::getList() as $conn) {
|
|
||||||
try {
|
|
||||||
$conn->query('SELECT 1');
|
|
||||||
$conn->close();
|
|
||||||
// 连接正常
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cid = self::getCid();
|
$cid = self::getCid();
|
||||||
if ($cid !== null) {
|
if ($cid !== null) {
|
||||||
unset(self::$list[$cid]);
|
unset(self::$list[$cid]);
|
||||||
|
|
@ -112,7 +104,6 @@ class DbCoroutineContext
|
||||||
foreach (self::getList() as $conn) {
|
foreach (self::getList() as $conn) {
|
||||||
try {
|
try {
|
||||||
$conn->query('SELECT 1');
|
$conn->query('SELECT 1');
|
||||||
$conn->close();
|
|
||||||
// 连接正常
|
// 连接正常
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue