diff --git a/backend/app/config.py b/backend/app/config.py index d23dcd33..f52a3606 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -4,6 +4,10 @@ from pathlib import Path from pydantic_settings import BaseSettings, SettingsConfigDict from typing import Optional +from utils.logger import setup_logger + +logger = setup_logger() + def resolve_env_file() -> Optional[str]: env = os.getenv("ENVIRONMENT", "local") @@ -12,12 +16,12 @@ def resolve_env_file() -> Optional[str]: if env == "local": env_file = backend_dir / ".env" - print("USING ENV FILE:", env_file) + logger.debug("USING ENV FILE:", env_file) return str(env_file) if env == "test": env_file = backend_dir / ".env.test" - print("USING ENV FILE:", env_file) + logger.debug("USING ENV FILE:", env_file) return str(env_file) # prod = no env file diff --git a/backend/categorisation/local_handler/invoke_local_lambda.py b/backend/categorisation/local_handler/invoke_local_lambda.py index 0897e7f2..5aa82846 100644 --- a/backend/categorisation/local_handler/invoke_local_lambda.py +++ b/backend/categorisation/local_handler/invoke_local_lambda.py @@ -2,7 +2,10 @@ import json import requests -LAMBDA_URL = "http://localhost:9000/2015-03-31/functions/function/invocations" +HOST = "localhost" +PORT = "9000" + +LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations" payload = { "Records": [