Commit a767372a authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

update dispatch_obsgroup_detector: append task only if success

parent b18ad976
Loading
Loading
Loading
Loading
+19 −17
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ class Dispatcher:
            this_instrument = this_obsgroup_plan_basis["instrument"][0]
            effective_detector_names = csst[this_instrument].effective_detector_names

            # loop over effective detectors
            for this_effective_detector_name in effective_detector_names:
                this_task = dict(
                    dataset=this_obsgroup_plan_basis["dataset"][0],
@@ -386,7 +387,8 @@ class Dispatcher:
                # 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
                # append this task if this_success
                if this_success:
                    task_list.append(
                        dict(
                            task=this_task,