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

Task #11063: Reintegrated task branch LOFAR-Release-2_21-Task11063 (fixed two...

Task #11063: Reintegrated task branch LOFAR-Release-2_21-Task11063 (fixed two bugs in ResourceAssigner) into the trunk
parents f2bd2580 545a956e
No related branches found
No related tags found
No related merge requests found
......@@ -235,13 +235,17 @@ class ResourceAssigner():
try:
startTime = parseDatetime(mainParset.getString('Observation.startTime'))
except Exception:
startTime = None
# If we don't have a valid startTime, use the current time
if startTime is None or startTime < datetime.utcnow():
startTime = datetime.utcnow() + timedelta(minutes=3)
maxPredecessorEndTime = self.getMaxPredecessorEndTime(specification_tree)
if maxPredecessorEndTime and maxPredecessorEndTime > startTime:
startTime = maxPredecessorEndTime + timedelta(minutes=3)
taskDuration = mainParset.getInt('ObsSW.Observation.Scheduler.taskDuration', -1)
taskDuration = mainParset.getInt('Observation.Scheduler.taskDuration', -1)
taskDuration = timedelta(seconds=taskDuration) if taskDuration > 0 else timedelta(hours=1)
endTime = startTime + taskDuration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment