mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-08 22:07:56 +00:00
add page rank update optional in the crawl queue
This commit is contained in:
parent
a5a2ec233e
commit
5df59661d8
@ -321,6 +321,16 @@ define('CRAWL_HOST_DEFAULT_NSFW', false);
|
|||||||
*/
|
*/
|
||||||
define('CRAWL_SITEMAPS', true);
|
define('CRAWL_SITEMAPS', true);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Re-calculate page rank on page update
|
||||||
|
*
|
||||||
|
* When enabled, may enlarge execution time
|
||||||
|
*
|
||||||
|
* true|false
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
define('CRAWL_PAGE_RANK_UPDATE', true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Renew robots.txt index by timing offset provided
|
* Renew robots.txt index by timing offset provided
|
||||||
*
|
*
|
||||||
|
@ -357,6 +357,8 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECOND
|
|||||||
$httpRequestsTimeTotal += $curl->getTotalTime();
|
$httpRequestsTimeTotal += $curl->getTotalTime();
|
||||||
|
|
||||||
// Update page rank
|
// Update page rank
|
||||||
|
if (CRAWL_PAGE_RANK_UPDATE) {
|
||||||
|
|
||||||
// @TODO add common method
|
// @TODO add common method
|
||||||
|
|
||||||
$hostPageRank = 0;
|
$hostPageRank = 0;
|
||||||
@ -380,6 +382,7 @@ foreach ($db->getHostPageCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECOND
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update registry
|
// Update registry
|
||||||
$db->updateHostPageRank($queueHostPage->hostPageId, $hostPageRank);
|
$db->updateHostPageRank($queueHostPage->hostPageId, $hostPageRank);
|
||||||
|
Loading…
Reference in New Issue
Block a user