Commit 2f7c491e authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

append n_file_expected and n_file_found to DAG messages instead of comments

parent 6ea633ba
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -274,8 +274,9 @@ class Dispatcher:
                join_type="inner",
                table_names=["data", "plan"],
            )
            # set comment
            this_task["comment"] = "n_file_expected = 1, n_file_found = 1"
            # set n_file_expected and n_file_found
            this_task["n_file_expected"] = 1
            this_task["n_file_found"] = 1
            # append this task
            task_list.append(
                dict(
@@ -388,10 +389,9 @@ class Dispatcher:
                else 0
            )
            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}"
            )
            # set n_file_expected and n_file_found
            this_task["n_file_expected"] = n_file_expected
            this_task["n_file_found"] = n_file_found
            # append this task
            task_list.append(
                dict(
@@ -513,10 +513,9 @@ class Dispatcher:

            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}"
            )
            # set n_file_expected and n_file_found
            this_task["n_file_expected"] = n_file_expected
            this_task["n_file_found"] = n_file_found
            # append this task
            task_list.append(
                dict(
@@ -615,10 +614,9 @@ class Dispatcher:

            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}"
            )
            # set n_file_expected and n_file_found
            this_task["n_file_expected"] = n_file_expected
            this_task["n_file_found"] = n_file_found
            # append this task
            task_list.append(
                dict(
+2 −1
Original line number Diff line number Diff line
@@ -11,5 +11,6 @@
    "obs_id": "40100000001",
    "detector": "VIS",
    "pmapname": "",
    "comment": ""
    "n_file_expected": -1,
    "n_file_found": -1
}
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -11,5 +11,6 @@
    "obs_id": "40100000001",
    "detector": "VIS",
    "pmapname": "",
    "comment": ""
    "n_file_expected": -1,
    "n_file_found": -1
}
+2 −1
Original line number Diff line number Diff line
@@ -9,5 +9,6 @@
    "obs_type": "STARE",
    "obs_group": "",
    "pmapname": "",
    "comment": ""
    "n_file_expected": -1,
    "n_file_found": -1
}
+2 −1
Original line number Diff line number Diff line
@@ -13,5 +13,6 @@
    "detector": "B",
    "pmapname": "",
    "ref_cat": "",
    "comment": ""
    "n_file_expected": -1,
    "n_file_found": -1
}
Loading