From 7ed24b66b736f5b822b946af74d99b3b8d82ec8e Mon Sep 17 00:00:00 2001 From: Flag Date: Thu, 23 Apr 2026 23:23:28 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20race=20condition=20exit=5Ffile=20z620=20?= =?UTF-8?q?=E2=80=94=20rm=20sync=20avant=20bg=20ffmpeg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/dispatcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dispatcher.py b/scripts/dispatcher.py index fcff56e..249d71a 100644 --- a/scripts/dispatcher.py +++ b/scripts/dispatcher.py @@ -394,7 +394,8 @@ def _extract_on_remote_host(job_id: int, worker: dict, src_host: str, src_path: dur = 0.0 frames_est = max(1, int(dur * FPS)) - _ssh_via(worker, src_host, f"mkdir -p {shlex.quote(remote_tmp)}") + _ssh_via(worker, src_host, + f"rm -f {shlex.quote(exit_file)}" + f" && rm -rf {shlex.quote(remote_tmp)}" + f" && mkdir -p {shlex.quote(remote_tmp)}") bg = ( f"rm -f {shlex.quote(exit_file)}; " f"ffmpeg -hide_banner -loglevel error -i {shlex.quote(src_path)} "