diff --git a/crontab/crawler.php b/crontab/crawler.php index de693d1..e87df39 100644 --- a/crontab/crawler.php +++ b/crontab/crawler.php @@ -282,7 +282,7 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECOND $httpRequestsTimeTotal += $curl->getTotalTime(); // Update page index anyway, with the current time and http code - $hostPagesProcessed += $db->updateHostPageCrawlQueue($queueHostPage->hostPageId, time(), $curl->getCode()); + $hostPagesProcessed += $db->updateHostPageCrawlQueue($queueHostPage->hostPageId, time(), $curl->getCode(), $curl->getSizeDownload()); // This page has on 200 code if (200 != $curl->getCode()) { diff --git a/database/yggo.mwb b/database/yggo.mwb index 63fa3d7..b43a77d 100644 Binary files a/database/yggo.mwb and b/database/yggo.mwb differ diff --git a/library/mysql.php b/library/mysql.php index b857838..8e89062 100644 --- a/library/mysql.php +++ b/library/mysql.php @@ -616,11 +616,11 @@ class MySQL { return $query->fetchAll(); } - public function updateHostPageCrawlQueue(int $hostPageId, int $timeUpdated, int $httpCode) { + public function updateHostPageCrawlQueue(int $hostPageId, int $timeUpdated, int $httpCode, int $size) { - $query = $this->_db->prepare('UPDATE `hostPage` SET `timeUpdated` = ?, `httpCode` = ? WHERE `hostPageId` = ? LIMIT 1'); + $query = $this->_db->prepare('UPDATE `hostPage` SET `timeUpdated` = ?, `httpCode` = ?, `size` = ? WHERE `hostPageId` = ? LIMIT 1'); - $query->execute([$timeUpdated, $httpCode, $hostPageId]); + $query->execute([$timeUpdated, $httpCode, $size, $hostPageId]); return $query->rowCount(); } diff --git a/media/db-prototype.png b/media/db-prototype.png index c58415d..c9cceba 100644 Binary files a/media/db-prototype.png and b/media/db-prototype.png differ