From aa9e5eb288199fc08ee59184a85ad74fa3dc6767 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Wed, 20 Nov 2024 20:52:32 +0000 Subject: [PATCH] use runs not len(sites) --- india_forecast_app/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/india_forecast_app/app.py b/india_forecast_app/app.py index 40b65a0..3424330 100644 --- a/india_forecast_app/app.py +++ b/india_forecast_app/app.py @@ -391,9 +391,9 @@ def app_run(timestamp: dt.datetime | None, write_to_db: bool = False, log_level: log.info(f"Completed forecasts for {successful_runs} runs for " f"{runs} model runs. This was for {len(sites)} sites") - if successful_runs == len(sites): + if successful_runs == runs: log.info("All forecasts completed successfully") - elif 0 < successful_runs < len(sites): + elif 0 < successful_runs < runs: raise Exception("Some forecasts failed") else: raise Exception("All forecasts failed")