diff --git a/MAC/Services/src/L2TMSSObservationControl.py b/MAC/Services/src/L2TMSSObservationControl.py index c57fc5cd25beb0c025f5f75f78d0c944b9a848c8..5e6fb35cab3b7c93111656f1e279aa732c8db28d 100755 --- a/MAC/Services/src/L2TMSSObservationControl.py +++ b/MAC/Services/src/L2TMSSObservationControl.py @@ -80,6 +80,7 @@ class L2TMSSObservationControlMessageHandler(TMSSEventMessageHandler): now = round_to_second_precision(datetime.utcnow()) scheduled_observation_subtasks = self.tmss_client.get_subtasks(state="scheduled", subtask_type='observation', + is_using_lofar2_stations=True, scheduled_start_time_greater_then=now, scheduled_start_time_less_then=now + LOOK_AHEAD_WINDOW) for subtask in scheduled_observation_subtasks: @@ -93,6 +94,10 @@ class L2TMSSObservationControlMessageHandler(TMSSEventMessageHandler): logger.debug("skipping %s %s subtask id=%s", subtask['state_value'], subtask['subtask_type'], subtask_id) return + if not subtask['is_using_lofar2_stations']: + logger.debug("skipping %s %s subtask id=%s because it is not using lofar2 stations", subtask['state_value'], subtask['subtask_type'], subtask_id) + return + scheduled_start_time = parser.parse(subtask['scheduled_start_time'], ignoretz=True) time_to_start = scheduled_start_time - datetime.utcnow() @@ -137,6 +142,10 @@ class L2TMSSObservationControlMessageHandler(TMSSEventMessageHandler): logger.debug("skipping %s %s subtask id=%s", subtask['state_value'], subtask['subtask_type'], subtask_id) return + if not subtask['is_using_lofar2_stations']: + logger.debug("skipping %s %s subtask id=%s because it is not using lofar2 stations", subtask['state_value'], subtask['subtask_type'], subtask_id) + return + scheduled_start_time = parser.parse(subtask['scheduled_start_time'], ignoretz=True) time_to_start = scheduled_start_time - datetime.utcnow()