Commit 6ea633ba authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add comment in DAG messages

parent cbb7535e
Loading
Loading
Loading
Loading
+21 −3
Original line number Diff line number Diff line
@@ -274,6 +274,8 @@ class Dispatcher:
                join_type="inner",
                table_names=["data", "plan"],
            )
            # set comment
            this_task["comment"] = "n_file_expected = 1, n_file_found = 1"
            # append this task
            task_list.append(
                dict(
@@ -380,12 +382,16 @@ class Dispatcher:
                this_detector in csst[this_instrument].effective_detector_names
            )

            n_files_expected = (
            n_file_expected = (
                this_data_detector_plan["n_frame"][0]
                if len(this_data_detector_plan) > 0
                else 0
            )
            n_files_found = len(this_data_detector_files)
            n_file_found = len(this_data_detector_files)
            # set comment
            this_task["comment"] = (
                f"n_file_expected = {n_file_expected}, n_file_found = {n_file_found}"
            )
            # append this task
            task_list.append(
                dict(
@@ -394,7 +400,7 @@ class Dispatcher:
                        len(this_data_detector_plan) == 1
                        and len(this_data_detector_files) == 1
                        and this_detector_effective
                        and n_files_found == n_files_expected
                        and n_file_found == n_file_expected
                    ),
                    relevant_plan=this_data_detector_plan,
                    relevant_data=this_data_detector_files,
@@ -505,6 +511,12 @@ class Dispatcher:
                    this_data_obsid_file["detector"]
                )

            n_file_expected = this_data_obsid_plan["n_frame"].sum()
            n_file_found = len(this_data_obsid_file)
            # set comment
            this_task["comment"] = (
                f"n_file_expected = {n_file_expected}, n_file_found = {n_file_found}"
            )
            # append this task
            task_list.append(
                dict(
@@ -601,6 +613,12 @@ class Dispatcher:
                        this_obsgroup_obsid_file["detector"]
                    )

            n_file_expected = this_obsgroup_plan["n_frame"].sum()
            n_file_found = len(this_obsgroup_file)
            # set comment
            this_task["comment"] = (
                f"n_file_expected = {n_file_expected}, n_file_found = {n_file_found}"
            )
            # append this task
            task_list.append(
                dict(
+2 −1
Original line number Diff line number Diff line
@@ -10,5 +10,6 @@
    "obs_group": "none",
    "obs_id": "40100000001",
    "detector": "VIS",
    "pmapname": ""
    "pmapname": "",
    "comment": ""
}
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -10,5 +10,6 @@
    "obs_group": "none",
    "obs_id": "40100000001",
    "detector": "VIS",
    "pmapname": ""
    "pmapname": "",
    "comment": ""
}
+2 −1
Original line number Diff line number Diff line
@@ -8,5 +8,6 @@
    "dataset": "csst-hstdm-c11-stare-sis1-v1",
    "obs_type": "STARE",
    "obs_group": "",
    "pmapname": ""
    "pmapname": "",
    "comment": ""
}
+2 −1
Original line number Diff line number Diff line
@@ -12,5 +12,6 @@
    "obs_id": "",
    "detector": "B",
    "pmapname": "",
    "ref_cat": ""
    "ref_cat": "",
    "comment": ""
}
Loading