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

add comment in DAG messages

parent cbb7535e
......@@ -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(
......
......@@ -10,5 +10,6 @@
"obs_group": "none",
"obs_id": "40100000001",
"detector": "VIS",
"pmapname": ""
"pmapname": "",
"comment": ""
}
\ No newline at end of file
......@@ -10,5 +10,6 @@
"obs_group": "none",
"obs_id": "40100000001",
"detector": "VIS",
"pmapname": ""
"pmapname": "",
"comment": ""
}
......@@ -8,5 +8,6 @@
"dataset": "csst-hstdm-c11-stare-sis1-v1",
"obs_type": "STARE",
"obs_group": "",
"pmapname": ""
"pmapname": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "",
"detector": "B",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "",
"detector": "B",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "20100000001",
"detector": "C1",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "10100232366",
"detector": "09",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "10100232366",
"detector": "09",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
......@@ -9,5 +9,6 @@
"obs_type": "BIAS",
"obs_group": "bias-temperature-var",
"detector": "09",
"pmapname": ""
"pmapname": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "10100232366",
"detector": "09",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
......@@ -12,5 +12,6 @@
"obs_id": "10100232366",
"detector": "09",
"pmapname": "",
"ref_cat": ""
"ref_cat": "",
"comment": ""
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment