mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 19:54:31 +00:00
Allow connector sync between warmup batches
This commit is contained in:
@@ -58,17 +58,11 @@ if (!function_exists('exec'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$worker = realpath(BRATONIEN_TOOLS_PATH.'runtime/lib/webdav-cache-warmup.php');
|
$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))
|
if (!$worker || !is_file($worker))
|
||||||
{
|
{
|
||||||
fwrite(STDERR, "WebDAV-Cache-Warmup-Worker wurde nicht gefunden.\n");
|
fwrite(STDERR, "WebDAV-Cache-Warmup-Worker wurde nicht gefunden.\n");
|
||||||
exit(1);
|
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';
|
$log = PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'bratonien-webdav-warmup.log';
|
||||||
$result = 0;
|
$result = 0;
|
||||||
@@ -135,11 +129,11 @@ foreach (bratonien_tools_nc_connector_connections() as $connection)
|
|||||||
@chmod($priority_file, 0664);
|
@chmod($priority_file, 0664);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Der Guard hält webdav-sync.lock für den gesamten Worker-Lauf geteilt.
|
// Der Worker schützt nur die kurze produktive Materialisierungsphase eines
|
||||||
// Dadurch kann der produktive Source-/Shadow-Tree während Download, Swap,
|
// einzelnen Bildes mit webdav-sync.lock. Downloads und Batchgrenzen bleiben
|
||||||
// Piwigo-Aufruf und Restore nicht von einem Connector-Sync ersetzt werden.
|
// frei, damit ein Connector-Sync neue Alben erkennen und Stufe 2 sicher
|
||||||
$base = escapeshellarg('/bin/bash').' '.escapeshellarg($guard).' '.escapeshellarg($state_dir)
|
// zwischen zwei vollständig restaurierten Batches priorisieren kann.
|
||||||
.' '.escapeshellarg(PHP_BINARY).' '.escapeshellarg($worker)
|
$base = escapeshellarg(PHP_BINARY).' '.escapeshellarg($worker)
|
||||||
.' --connection-id='.$connection_id
|
.' --connection-id='.$connection_id
|
||||||
.' --mode='.escapeshellarg($mode);
|
.' --mode='.escapeshellarg($mode);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user