Skip to content
Snippets Groups Projects
Commit 10b31454 authored by Auke Klazema's avatar Auke Klazema
Browse files

Task #9893: TriggerEmailService was not aware of the new dwelling time parameters

parent 0e6980a9
No related branches found
No related tags found
No related merge requests found
......@@ -239,6 +239,7 @@ class TriggerNotificationListener(AbstractBusListener):
start_times = doc.getroot().findall('specification/activity/observation/timeWindowSpecification/startTime')
if start_times: # Not dwelling
start_time = datetime.strptime(start_times[0].text, '%Y-%m-%dT%H:%M:%S')
durations = doc.getroot().findall(
......@@ -251,6 +252,17 @@ class TriggerNotificationListener(AbstractBusListener):
stop_time = start_time + timedelta(seconds=duration_seconds)
return start_time, stop_time
else: # Dwelling
min_start_times = doc.getroot().findall('specification/activity/observation/timeWindowSpecification/minStartTime')
min_start_time = datetime.strptime(min_start_times[0].text, '%Y-%m-%dT%H:%M:%S')
max_end_times = doc.getroot().findall('specification/activity/observation/timeWindowSpecification/maxEndTime')
max_end_time = datetime.strptime(max_end_times[0].text, '%Y-%m-%dT%H:%M:%S')
return min_start_time, max_end_time
def start_listening(self, **kwargs):
self.mom_rpc_client.open()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment