Skip to content

Commit

Permalink
Merge commit 'b27dfa29544bd2ed4096b6ab4f23cb806b3c4f99' into update-f…
Browse files Browse the repository at this point in the history
…orecast-all-creation-limit
  • Loading branch information
peterdudfield committed Mar 13, 2024
2 parents 16d2a06 + b27dfa2 commit 40ace6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ def get_forecasts_from_database(
# get the latest forecast for all gsps.

if historic:

if creation_utc_limit is not None:
raise HTTPException(
status_code=400,
detail="creation_utc_limit is not supported for historic=True forecasts. "
"These forecast are continuously updated, compare to a forecast made a particular time."
"These forecast are continuously updated, compare to a forecast made a particular time.",
)

start_datetime = get_start_datetime(start_datetime=start_datetime_utc)
Expand All @@ -135,7 +134,6 @@ def get_forecasts_from_database(
logger.debug(f"Found {len(forecasts)} forecasts from database")

else:

# To speed up read time we only look at the last 12 hours of results, and take floor 30 mins
if start_datetime_utc is None:
start_datetime_utc = floor_30_minutes_dt(
Expand Down
2 changes: 1 addition & 1 deletion src/gsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_all_available_forecasts(
end_datetime_utc=end_datetime_utc,
compact=compact,
gsp_ids=gsp_ids,
creation_utc_limit=creation_limit_utc
creation_utc_limit=creation_limit_utc,
)

if not compact:
Expand Down

0 comments on commit 40ace6d

Please sign in to comment.