|
|
|
@ -375,10 +375,16 @@ def get_alerts(countyCodes):
|
|
|
|
LOGGER.debug("getAlerts: Using effective time for alerting")
|
|
|
|
LOGGER.debug("getAlerts: Using effective time for alerting")
|
|
|
|
time_type_start = "effective"
|
|
|
|
time_type_start = "effective"
|
|
|
|
time_type_end = "expires"
|
|
|
|
time_type_end = "expires"
|
|
|
|
else:
|
|
|
|
elif timetype_mode == "onset":
|
|
|
|
LOGGER.debug("getAlerts: Using onset time for alerting")
|
|
|
|
LOGGER.debug("getAlerts: Using onset time for alerting")
|
|
|
|
time_type_start = "onset"
|
|
|
|
time_type_start = "onset"
|
|
|
|
time_type_end = "ends"
|
|
|
|
time_type_end = "ends"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
LOGGER.error(
|
|
|
|
|
|
|
|
"getAlerts: Invalid TimeType specified in config.yaml. Using onset time instead."
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
time_type_start = "onset"
|
|
|
|
|
|
|
|
time_type_end = "ends"
|
|
|
|
|
|
|
|
|
|
|
|
for countyCode in countyCodes:
|
|
|
|
for countyCode in countyCodes:
|
|
|
|
url = "https://api.weather.gov/alerts/active?zone={}".format(countyCode)
|
|
|
|
url = "https://api.weather.gov/alerts/active?zone={}".format(countyCode)
|
|
|
|
|