Wrap blocking mkdir() calls in run_blocking for async startup and setup
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user