This commit is contained in:
2026-01-20 16:42:49 -08:00
parent 1e2054189b
commit 922b649e17
9 changed files with 351 additions and 141 deletions

View File

@@ -2,6 +2,7 @@
import datetime
import hashlib
import inspect
import json
import os
import shutil
@@ -996,16 +997,25 @@ class PipelineLiveProgress:
def stop(self) -> None:
# Safe to call whether Live is running or paused.
if self._live is not None:
stop_fn = self._live.stop
has_clear = False
try:
try:
self._live.stop(clear=True)
except TypeError:
self._live.stop()
except Exception:
self._live.stop()
except Exception:
signature = inspect.signature(stop_fn)
has_clear = "clear" in signature.parameters
except (ValueError, TypeError):
pass
try:
if has_clear:
stop_fn(clear=True)
else:
stop_fn()
except Exception:
try:
stop_fn()
except Exception:
pass
self._live = None
self._console = None
self._overall = None