Commit 361caefb authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

append n_file_expected and n_file_found in task

parent 3d80bb19
......@@ -473,6 +473,7 @@ class Dispatcher:
task_list = []
# loop over obsid
for this_obsid_basis in obsid_basis.groups:
# find relevant plan
this_relevant_plan_basis = table.join(
this_obsid_basis[group_keys][:1],
plan_basis,
......@@ -480,6 +481,8 @@ class Dispatcher:
join_type=PLAN_JOIN_TYPE,
)
assert len(this_relevant_plan_basis) == 1
# generate task
this_task = dict(this_relevant_plan_basis[group_keys][0])
n_file_expected = this_relevant_plan_basis[0]["n_file"]
n_file_found = len(this_obsid_basis)
this_instrument = this_relevant_plan_basis[0]["instrument"]
......@@ -489,6 +492,8 @@ class Dispatcher:
n_file_expected == n_file_found
and detectors_found == detectors_expected
)
this_task["n_file_expected"] = n_file_expected
this_task["n_file_found"] = n_file_found
# append this task
task_list.append(
dict(
......
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