diff --git a/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py b/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py index 140960fa1b1f70e981a030efd37327deb52d0244..851d6edd8e63e1e0c945f6208a6c7f9622d0b237 100755 --- a/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py +++ b/SAS/TMSS/backend/services/scheduling/test/t_dynamic_scheduling.py @@ -58,7 +58,7 @@ def tearDownModule(): from lofar.sas.tmss.test.tmss_test_data_django_models import * from lofar.sas.tmss.tmss.tmssapp import models -from lofar.sas.tmss.tmss.tmssapp.tasks import create_scheduling_unit_blueprint_and_tasks_and_subtasks_from_scheduling_unit_draft, update_task_graph_from_specifications_doc, mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable, create_scheduling_unit_draft_from_observing_strategy_template, cancel_scheduling_unit_blueprint +from lofar.sas.tmss.tmss.tmssapp.tasks import create_scheduling_unit_blueprint_and_tasks_and_subtasks_from_scheduling_unit_draft, update_task_graph_from_specifications_doc, create_scheduling_unit_draft_from_observing_strategy_template from lofar.sas.tmss.test.test_utils import set_subtask_state_following_allowed_transitions, wait_for_scheduling_unit_blueprint_status from lofar.sas.tmss.tmss.tmssapp.conversions import Pointing @@ -652,7 +652,7 @@ class TestFixedTimeScheduling(BaseDynamicSchedulingTestCase): del scheduling_unit_blueprint.scheduling_constraints_doc['time']['at'] scheduling_unit_blueprint.save() wipe_evaluate_constraints_caches() - mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) + mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) self.scheduler.schedule_next_scheduling_unit() scheduling_unit_blueprint.refresh_from_db() self.assertEqual(models.SchedulingUnitStatus.Choices.SCHEDULED.value, scheduling_unit_blueprint.status.value) @@ -751,7 +751,7 @@ class TestFixedTimeScheduling(BaseDynamicSchedulingTestCase): description='') wipe_evaluate_constraints_caches() - mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) + mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) self.scheduler.schedule_fixed_time_scheduling_units() scheduling_unit_blueprint.refresh_from_db() self.assertEqual(models.SchedulingUnitStatus.Choices.SCHEDULED.value, scheduling_unit_blueprint.status.value) @@ -878,7 +878,7 @@ class TestFixedTimeScheduling(BaseDynamicSchedulingTestCase): for state in non_active_project_states: # make sure the unit is schedulable to start with - mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) + mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) self.assertEqual(models.SchedulingUnitStatus.Choices.SCHEDULABLE.value, scheduling_unit_blueprint.status.value) # set the project's state @@ -899,7 +899,7 @@ class TestFixedTimeScheduling(BaseDynamicSchedulingTestCase): scheduling_unit_blueprint.project.save() # make sure the unit is schedulable to start with - mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) + mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) self.assertEqual(models.SchedulingUnitStatus.Choices.SCHEDULABLE.value, scheduling_unit_blueprint.status.value) # try the method-under-test: schedule_fixed_time_scheduling_units @@ -2336,7 +2336,7 @@ class TestDynamicScheduling(BaseDynamicSchedulingTestCase): # in the event driven scheduler this would result in a schedulable unit again. (for now, set it manually) scheduling_unit_blueprint_dynamic.scheduling_constraints_doc = {'scheduler': 'dynamic'} scheduling_unit_blueprint_dynamic.save() - mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint_dynamic) + mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint_dynamic) wipe_evaluate_constraints_caches() # assure that the scheduling_unit_blueprint_fixed_time is still scheduled (and thus, still in the way) @@ -2444,7 +2444,7 @@ class TestDynamicScheduling(BaseDynamicSchedulingTestCase): logger.info('---------------------------------------------------------------------\nchecking for expected reason: %s', expected_reason_start) # reset unit... - mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) + mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) self.assertEqual('', scheduling_unit_blueprint.unschedulable_reason) wipe_evaluate_constraints_caches() diff --git a/SAS/TMSS/backend/services/scheduling/test/t_scheduling_constraints.py b/SAS/TMSS/backend/services/scheduling/test/t_scheduling_constraints.py index dd1d2941b7f0ae3a9bafd0946a13959e853ef24f..f85b80f372504a095ceb76e4c86f72c8dc86c433 100755 --- a/SAS/TMSS/backend/services/scheduling/test/t_scheduling_constraints.py +++ b/SAS/TMSS/backend/services/scheduling/test/t_scheduling_constraints.py @@ -61,7 +61,7 @@ def tearDownModule(): from lofar.sas.tmss.test.tmss_test_data_django_models import * from lofar.sas.tmss.tmss.tmssapp import models -from lofar.sas.tmss.tmss.tmssapp.tasks import create_scheduling_unit_blueprint_and_tasks_and_subtasks_from_scheduling_unit_draft, update_task_graph_from_specifications_doc, mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable, create_scheduling_unit_draft_from_observing_strategy_template +from lofar.sas.tmss.tmss.tmssapp.tasks import create_scheduling_unit_blueprint_and_tasks_and_subtasks_from_scheduling_unit_draft, update_task_graph_from_specifications_doc, create_scheduling_unit_draft_from_observing_strategy_template from lofar.sas.tmss.test.test_utils import set_subtask_state_following_allowed_transitions, wait_for_scheduling_unit_blueprint_status from lofar.sas.tmss.services.scheduling.constraints import get_boundary_stations_from_list diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py index 5d036be2b73da71ef2309cf0b70327974457ce80..184cd85a265edc531af136724c6f18573cdf30bb 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/viewsets/specification.py @@ -1287,7 +1287,7 @@ class SchedulingUnitBlueprintViewSet(LOFARViewSet): if scheduling_unit_blueprint.status.value == SchedulingUnitStatus.Choices.SCHEDULED.value: scheduling_unit_blueprint = unschedule_subtasks_in_scheduling_unit_blueprint(scheduling_unit_blueprint) elif scheduling_unit_blueprint.status.value == SchedulingUnitStatus.Choices.UNSCHEDULABLE.value: - scheduling_unit_blueprint = mark_independent_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) + scheduling_unit_blueprint = mark_subtasks_in_scheduling_unit_blueprint_as_schedulable(scheduling_unit_blueprint) scheduling_unit_blueprint = schedule_independent_subtasks_in_scheduling_unit_blueprint(scheduling_unit_blueprint, start_time) serializer = self.get_serializer(scheduling_unit_blueprint)