diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/populate.py b/SAS/TMSS/backend/src/tmss/tmssapp/populate.py index 915ce6b0588ac2bf80d9f23611b4e8718f52c17f..ff09c76dfa86b20a19ca114ef9647a41090b0032 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/populate.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/populate.py @@ -617,7 +617,8 @@ def populate_misc(apps, schema_editor): elif isTestEnvironment(): Filesystem.objects.create(name="Test Storage (CIT)", cluster=cep4_cluster, capacity=3.6e15, directory="/data/test-projects") else: - Filesystem.objects.create(name="Development Test FS", cluster=cep4_cluster, capacity=1e9, directory="/tmp") + localhost = Cluster.objects.create(name="localhost", location="local", archive_site=False) + Filesystem.objects.create(name="Development Test FS", cluster=localhost, capacity=1e9, directory="/tmp") # LTA-site clusters sara_cluster = Cluster.objects.create(name="SARA", location="SARA", archive_site=True) diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py b/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py index 9b463b3961276dd958250c6d18b6912ffa6d0603..db6f09db0d2e7f3c4af2b817de793855de108b6d 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/subtasks.py @@ -660,7 +660,7 @@ def create_observation_control_subtask_from_task_blueprint(task_blueprint: TaskB raise SubtaskCreationException("Total number of subbands %d exceeds the maximum of 488 for task_blueprint id=%s" % (len(all_subbands), task_blueprint.id)) # step 1: create subtask in defining state - cluster_name = task_blueprint.specifications_doc.get("storage_cluster", "CEP4") + cluster_name = task_blueprint.specifications_doc.get("correlator", {}).get("storage_cluster", "CEP4") if isProductionEnvironment() else "localhost" subtask_data = { "scheduled_start_time": None, "scheduled_stop_time": None, "state": SubtaskState.objects.get(value=SubtaskState.Choices.DEFINING.value), @@ -2298,8 +2298,9 @@ def schedule_copy_subtask(copy_subtask: Subtask): # prepare output_dataproducts, which are just exact copies of the input, exept for the directory dataproduct_feedback_template = DataproductFeedbackTemplate.get_version_or_latest(name="empty") dataproduct_feedback_doc = dataproduct_feedback_template.get_default_json_document_for_schema() + destination_dir = copy_subtask.specifications_doc['destination'][copy_subtask.specifications_doc['destination'].find(':')+1:] output_dataproducts = [Dataproduct(filename=input_dp.filename, - directory=copy_subtask.specifications_doc['destination'], # the key property of the copytask. Where to copy to? + directory=destination_dir, dataformat=input_dp.dataformat, datatype=input_dp.datatype, producer=subtask_output,