chore: remove stmt timeout debug logging (#9693)
This commit is contained in:
@@ -3,7 +3,7 @@ import uuid
|
|||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from typing import AsyncGenerator
|
from typing import AsyncGenerator
|
||||||
|
|
||||||
from sqlalchemy import NullPool, text
|
from sqlalchemy import NullPool
|
||||||
from sqlalchemy.ext.asyncio import (
|
from sqlalchemy.ext.asyncio import (
|
||||||
AsyncEngine,
|
AsyncEngine,
|
||||||
AsyncSession,
|
AsyncSession,
|
||||||
@@ -88,10 +88,6 @@ class DatabaseRegistry:
|
|||||||
try:
|
try:
|
||||||
async with async_session_factory() as session:
|
async with async_session_factory() as session:
|
||||||
try:
|
try:
|
||||||
result = await session.execute(text("SELECT pg_backend_pid(), current_setting('statement_timeout')"))
|
|
||||||
pid, timeout = result.one()
|
|
||||||
logger.warning(f"[stmt_timeout_debug] pid={pid} statement_timeout={timeout}")
|
|
||||||
await session.rollback()
|
|
||||||
yield session
|
yield session
|
||||||
await session.commit()
|
await session.commit()
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
|
|||||||
Reference in New Issue
Block a user