From c930487513543c5edffaeae80ec3116c53c867d3 Mon Sep 17 00:00:00 2001 From: Mark90 Date: Mon, 1 Dec 2025 16:23:42 +0100 Subject: [PATCH] Update main.py to initialize logging and the database connection --- main.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 60514ba..d9f1d13 100644 --- a/main.py +++ b/main.py @@ -11,9 +11,19 @@ # See the License for the specific language governing permissions and # limitations under the License. - +import typer +from nwastdlib.logging import initialise_logging +from orchestrator import app_settings from orchestrator.cli.main import app as core_cli +from orchestrator.db import init_database +from orchestrator.log_config import LOGGER_OVERRIDES + + +def init_cli_app() -> typer.Typer: + initialise_logging(LOGGER_OVERRIDES) + init_database(app_settings) + return core_cli() if __name__ == "__main__": - core_cli() + init_cli_app()