From 28cacbbd3867234d4c11ece2e515e181f7e4515f Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Fri, 21 Aug 2020 12:35:50 +0200 Subject: [PATCH] TMSS-190: extended documentation. fixed typo. --- SAS/TMSS/src/tmss/tmssapp/models/specification.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/src/tmss/tmssapp/models/specification.py index 7d98fdc123c..6b21c1512c7 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/models/specification.py @@ -662,7 +662,9 @@ class TaskBlueprint(NamedCommon): @property def relative_start_time(self) -> datetime.timedelta: - '''return the earliest relative start time of all subtasks of this task + '''The relative start time is relative to the start time of the 'start' of the parent scheduling unit. + It's based on the scheduling_relation's from the scheduling_unit's specification, + and hence it determines the order in which the tasks within the unit should be executed. ''' scheduling_relations = list(self.first_scheduling_relation.all()) + list(self.second_scheduling_relation.all()) for scheduling_relation in scheduling_relations: @@ -679,11 +681,12 @@ class TaskBlueprint(NamedCommon): # todo: max of several relations if previous_related_task_blueprint.relative_stop_time: return previous_related_task_blueprint.relative_stop_time + datetime.timedelta(seconds=time_offset) - return datetime.timedelta(seconds=666660) + return datetime.timedelta(seconds=0) @property def relative_stop_time(self) -> datetime.timedelta: - '''return the latest relative stop time of all subtasks of this task + '''The relative_stop_time is the relative_start_time+duration. + See relative_start_time for an explanation of it's intended usage. ''' # todo: when it was added, check if subtask.specifications_template.type.value == TaskType.Choices.OBSERVATION.value: try: -- GitLab