Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(NG.py): Adjust re-fetch frequency for NG.py #7714

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions parsers/NG.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,7 @@ def get_data(session: Session, logger: Logger, timestamp: datetime):
return production_dict


# The data is hourly, but it takes a few minutes after the turn of each hour
# for the server to populate it. Setting the re-fetch frequency to 45 min will
# ensure that if the live data is missing for a given hour when it's first
# fetched, it will be fetched again during the same hour. (As far as I can
# tell, the table is always populated within 15 min of the turn of the hour).
@config.refetch_frequency(timedelta(minutes=45))
@config.refetch_frequency(timedelta(hours=24))
def fetch_production(
zone_key: ZoneKey = ZoneKey("NG"),
session: Session | None = None,
Expand Down
Loading