From a63d5fe3c3652172aa97d11a27ac67143107d605 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Thu, 3 Sep 2026 14:15:59 +0200 Subject: [PATCH] Allow connector sync between warmup batches --- runtime/webdav-warmup-dispatch.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/runtime/webdav-warmup-dispatch.php b/runtime/webdav-warmup-dispatch.php index 870e1d3..62c3fbb 100644 --- a/runtime/webdav-warmup-dispatch.php +++ b/runtime/webdav-warmup-dispatch.php @@ -58,17 +58,11 @@ if (!function_exists('exec')) } $worker = realpath(BRATONIEN_TOOLS_PATH.'runtime/lib/webdav-cache-warmup.php'); -$guard = realpath(BRATONIEN_TOOLS_PATH.'runtime/lib/run-webdav-cache-warmup.sh'); if (!$worker || !is_file($worker)) { fwrite(STDERR, "WebDAV-Cache-Warmup-Worker wurde nicht gefunden.\n"); exit(1); } -if (!$guard || !is_file($guard)) -{ - fwrite(STDERR, "WebDAV-Cache-Warmup-Schutzskript wurde nicht gefunden.\n"); - exit(1); -} $log = PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'bratonien-webdav-warmup.log'; $result = 0; @@ -135,11 +129,11 @@ foreach (bratonien_tools_nc_connector_connections() as $connection) @chmod($priority_file, 0664); } - // Der Guard hält webdav-sync.lock für den gesamten Worker-Lauf geteilt. - // Dadurch kann der produktive Source-/Shadow-Tree während Download, Swap, - // Piwigo-Aufruf und Restore nicht von einem Connector-Sync ersetzt werden. - $base = escapeshellarg('/bin/bash').' '.escapeshellarg($guard).' '.escapeshellarg($state_dir) - .' '.escapeshellarg(PHP_BINARY).' '.escapeshellarg($worker) + // Der Worker schützt nur die kurze produktive Materialisierungsphase eines + // einzelnen Bildes mit webdav-sync.lock. Downloads und Batchgrenzen bleiben + // frei, damit ein Connector-Sync neue Alben erkennen und Stufe 2 sicher + // zwischen zwei vollständig restaurierten Batches priorisieren kann. + $base = escapeshellarg(PHP_BINARY).' '.escapeshellarg($worker) .' --connection-id='.$connection_id .' --mode='.escapeshellarg($mode);