From dc61230e3c05556a38d62542e8f24d87f603dc60 Mon Sep 17 00:00:00 2001 From: Luis Sago Date: Tue, 5 Sep 2023 17:45:32 +0200 Subject: [PATCH] Include url when warning if using default data app --- federated_learning.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/federated_learning.py b/federated_learning.py index 6704984..4c9ac06 100644 --- a/federated_learning.py +++ b/federated_learning.py @@ -17,7 +17,7 @@ from dataset_handler import DataSetHandler debug_sleep_time = int(os.environ.get("DEBUG_SLEEP_TIME", "10")) - +data_app_url = os.environ.get("DATA_APP_URL", "http://localhost:8085") def start_background_loop(loop: asyncio.AbstractEventLoop) -> None: asyncio.set_event_loop(loop) @@ -133,8 +133,7 @@ async def train_model(self) -> None: logger.setLevel(level=logging.INFO) if os.environ.get("DATA_APP_URL") is None: - logger.warning("DATA_APP_URL not set, will use default!") - data_app_url = os.environ.get("DATA_APP_URL", "http://localhost:8085") + logger.warning("DATA_APP_URL not set, will use default: %s", data_app_url) federated_learning_handler = FederatedLearningHandler() dataset_handler = DataSetHandler()