From 62149220b93b7e9135944289be2474bd04240619 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 23 Mar 2024 03:16:01 +0200 Subject: [PATCH] update http code even progress function fails --- src/cli/document/crawl.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cli/document/crawl.php b/src/cli/document/crawl.php index 04eba22..e0af44c 100644 --- a/src/cli/document/crawl.php +++ b/src/cli/document/crawl.php @@ -202,6 +202,17 @@ foreach($index->search('') $upload, $uploaded ) { + global $index; + global $document; + + $index->updateDocument( + [ + 'time' => time(), + 'code' => 200 + ], + $document->getId() + ); + return $downloaded > CONFIG_CLI_DOCUMENT_CRAWL_CURL_DOWNLOAD_SIZE_MAX ? 1 : 0; } );