Name migrate span of scanner

This commit is contained in:
Zoe Roux 2025-11-20 00:03:24 +01:00
parent 188ce3f67d
commit 37ec32b52d
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -5,8 +5,10 @@ from logging import getLogger
from typing import Any, cast
from asyncpg import Connection, Pool, create_pool
from opentelemetry import trace
logger = getLogger(__name__)
tracer = trace.get_tracer("kyoo.scanner")
pool: Pool
@ -55,6 +57,7 @@ async def get_db_fapi():
yield db
@tracer.start_as_current_span("migrate")
async def migrate(migrations_dir="./migrations"):
async with get_db() as db:
_ = await db.execute(

View File

@ -75,7 +75,7 @@ class RequestProcessor:
self._database.add_termination_listener(terminated)
await self._database.add_listener("scanner_requests", process)
logger.info("Listening for requestes")
logger.info("Listening for requests")
_ = await closed.wait()
logger.info("stopping...")
except CancelledError: