Skip to content

Commit

Permalink
use runs not len(sites)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Nov 20, 2024
1 parent 3d0faf6 commit aa9e5eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions india_forecast_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit aa9e5eb

Please sign in to comment.