diff --git a/src/cli/document/crawl.php b/src/cli/document/crawl.php index 6a7f6b3..8744dc4 100644 --- a/src/cli/document/crawl.php +++ b/src/cli/document/crawl.php @@ -13,7 +13,7 @@ function getLastSnapTime(array $files): int foreach ($files as $file) { - if (!str_ends_with($filename, '.tar.gz')) + if (!str_ends_with($file, '.tar.gz')) { continue; } @@ -826,6 +826,9 @@ foreach($index->search('') @mkdir($filepath, 0755, true); // Check latest snap older than defined in settings + echo getLastSnapTime((array) scandir($filepath)) . PHP_EOL; + echo time() - getLastSnapTime((array) scandir($filepath)) . PHP_EOL; + echo $config->cli->document->crawl->snap->timeout . PHP_EOL; if (time() - getLastSnapTime((array) scandir($filepath)) > $config->cli->document->crawl->snap->timeout) { $filename = sprintf(