Skip to content
Snippets Groups Projects
Commit cd28e8be authored by Ruud Beukema's avatar Ruud Beukema
Browse files

Task #9893: DwellScheduler now forces time in between tasks (1 minute) to...

Task #9893: DwellScheduler now forces time in between tasks (1 minute) to allow for the setup of stations
parent 27e0abbb
No related branches found
No related tags found
No related merge requests found
...@@ -282,6 +282,9 @@ class PriorityScheduler(BasicScheduler): ...@@ -282,6 +282,9 @@ class PriorityScheduler(BasicScheduler):
broker=broker, broker=broker,
timeout=120) timeout=120)
# Time needed in between tasks to setup the stations
self.STATION_SETUP_TIME_MINUTES = 1
def open(self): def open(self):
""" Open connections to the required services """ """ Open connections to the required services """
self.momqueryservice.open() self.momqueryservice.open()
...@@ -426,6 +429,10 @@ class PriorityScheduler(BasicScheduler): ...@@ -426,6 +429,10 @@ class PriorityScheduler(BasicScheduler):
if unkillable_task_ids: if unkillable_task_ids:
# note that we need to use the endtime of the claims, as they may extend beyond the task # note that we need to use the endtime of the claims, as they may extend beyond the task
earliest_potential_starttime = min([c["endtime"] for c in conflicting_claims if c["task_id"] in unkillable_task_ids]) earliest_potential_starttime = min([c["endtime"] for c in conflicting_claims if c["task_id"] in unkillable_task_ids])
# Allow the system X minutes station setup
earliest_potential_starttime += timedelta(minutes=self.STATION_SETUP_TIME_MINUTES)
self._propose_potential_starttime(earliest_potential_starttime) self._propose_potential_starttime(earliest_potential_starttime)
return kill_task_list return kill_task_list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment