Wrap blocking mkdir() calls in run_blocking for async startup and setup

This commit is contained in:
2026-04-14 13:54:47 +02:00
parent 6b436dc354
commit 2a7766d206
3 changed files with 4 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ async def startup_shared_resources(
A tuple of ``(http_session, scheduler)``.
"""
db_path: Path = Path(settings.database_path)
db_path.parent.mkdir(parents=True, exist_ok=True)
await run_blocking(db_path.parent.mkdir, parents=True, exist_ok=True)
log.debug("database_directory_ensured", directory=str(db_path.parent))