Don't mark batched steps «À revalider».
This commit is contained in:
1 parent
c155e3eebc
commit
52a8589261
2 files changed
+45
-14
No files matched your search
+13
-7
@@ -1591,12 +1591,7 @@ class CopienatorApp(tk.Tk):
|
||||
|
||||
self._save_current_form()
|
||||
run_values = self._values()
|
||||
ordered_ids = self._progression_ids(step.id)
|
||||
if step.id == "correction" and variant.id == "integrate":
|
||||
# Integration consumes the retrieved batches; it does not invalidate them.
|
||||
ordered_ids = [step_id for step_id in ordered_ids
|
||||
if not self.step_by_id[step_id].skip_for_live_correction]
|
||||
self.state_store.invalidate_after(ordered_ids, step.id)
|
||||
self._invalidate_after_step(step, variant.id)
|
||||
self.state_store.update_step(
|
||||
step.id,
|
||||
status="running",
|
||||
@@ -1646,13 +1641,24 @@ class CopienatorApp(tk.Tk):
|
||||
self._populate_tree()
|
||||
self._update_controls()
|
||||
|
||||
def _invalidate_after_step(self, step: StepDefinition, variant_id: str) -> None:
|
||||
# Checking remote job status does not change any downstream input.
|
||||
if step.id == "batch_status":
|
||||
return
|
||||
ordered_ids = self._progression_ids(step.id)
|
||||
if step.id == "correction" and variant_id in {"live", "refaire", "integrate"}:
|
||||
# These modes reuse correction inputs without generating new batches.
|
||||
ordered_ids = [step_id for step_id in ordered_ids
|
||||
if not self.step_by_id[step_id].skip_for_live_correction]
|
||||
self.state_store.invalidate_after(ordered_ids, step.id)
|
||||
|
||||
def _mark_step(
|
||||
self, status: str, *, automatic: bool = False, reason: str | None = None
|
||||
) -> None:
|
||||
if not self.current_step or not self.state_store.evaluation or self.active_step_id:
|
||||
return
|
||||
self._save_current_form()
|
||||
self.state_store.invalidate_after(self._progression_ids(self.current_step.id), self.current_step.id)
|
||||
self._invalidate_after_step(self.current_step, self._current_variant().id)
|
||||
self.state_store.update_step(self.current_step.id, status=status)
|
||||
history: dict[str, object] = {
|
||||
"step": self.current_step.id,
|
||||
|
||||
Reference in new issue
Block a user