File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
22
33import sys
4- from datetime import datetime
4+ from datetime import datetime , timedelta
55from logging import Logger , getLogger
66from typing import Any
77from zoneinfo import ZoneInfo
1010from bs4 import BeautifulSoup
1111from requests import Session
1212
13+ # Local library imports
14+ from parsers .lib .config import refetch_frequency , use_proxy
15+
1316REALTIME_SOURCE = "https://tsoc.org.cy/electrical-system/total-daily-system-generation-on-the-transmission-system/"
1417HISTORICAL_SOURCE = "https://tsoc.org.cy/electrical-system/archive-total-daily-system-generation-on-the-transmission-system/?startdt={}&enddt=%2B1days"
1518
@@ -112,6 +115,8 @@ def fetch_production(self, target_datetime: datetime | None) -> list:
112115 return data
113116
114117
118+ @refetch_frequency (timedelta (days = 1 ))
119+ @use_proxy (country_code = "CY" )
115120def fetch_production (
116121 zone_key : str = "CY" ,
117122 session : Session | None = None ,
You can’t perform that action at this time.
0 commit comments