Skip to content

Commit

Permalink
Add missing changes to main
Browse files Browse the repository at this point in the history
  • Loading branch information
stvoutsin committed Oct 18, 2024
1 parent d796583 commit 35cffa1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sia/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .dependencies.labeled_butler_factory import (
labeled_butler_factory_dependency,
)
from .dependencies.obscore_configs import obscore_config_dependency
from .errors import votable_exception_handler
from .exceptions import VOTableError
from .handlers.external import external_router
Expand All @@ -44,14 +45,16 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
"""Set up and tear down the application."""
logger.debug("SIA has started up.")
await labeled_butler_factory_dependency.initialize(config=config)
await obscore_config_dependency.initialize(config=config)
await context_dependency.initialize(config=config)

yield

await labeled_butler_factory_dependency.aclose()
await obscore_config_dependency.aclose()
await context_dependency.aclose()
logger.debug("SIA shut down complete.")
await http_client_dependency.aclose()
logger.debug("SIA shut down complete.")


configure_logging(
Expand Down

0 comments on commit 35cffa1

Please sign in to comment.