feat(scrape): configure item srapeInterval, Avoid frequent scrape

This commit is contained in:
OldHawk
2017-09-05 11:53:03 +08:00
parent c8bddc27f2
commit f858d5950e

View File

@@ -18,7 +18,7 @@ module.exports = {
admin: 'admin@chd.im',
baseUrl: 'http://chd.im:3000',
clientBlackListUrl: 'http://chd.im:3000/client_black_list',
privateTorrentCmsMode: true
privateTorrentCmsMode: false
},
/**
@@ -27,17 +27,20 @@ module.exports = {
* this option used only when public cms mode (announce.privateTorrentCmsMode = false),
* this defines the timing of scrape torrent status from other tracker server
*
* @onTorrentUpload: scrape status at server side when the torrent uploaded by a user (= init the status info)
* @onTorrentInHome: scrape each torrent status at client side when load into home page (= update the status info)
* @onTorrentInList: scrape each torrent status at client side when load into torrent list page (= update the status info)
* if too more items list in one page, this will make efficiency very low
* @onTorrentInDetail: scrape current torrent status at client side when load torrent detail info
* @scrapeInterval: scrape interval with torrent last_scrape, Avoid frequent scrape, unit in hours
* @onTorrentUpload: scrape status at server side when the torrent uploaded by a user (= init the status info)
* @onTorrentInHome: scrape each torrent status at client side when load into home page (= update the status info)
* @onTorrentInList: scrape each torrent status at client side when load into torrent list page (= update the status info)
* if too more items list in one page, this will make efficiency very low
* @onTorrentInDetail: scrape current torrent status at client side when load torrent detail info,
* if onTorrentInHome and onTorrentInList is true, this value recommend to false
*/
scrapeTorrentStatus: {
scrapeInterval: 2,
onTorrentUpload: true,
onTorrentInHome: true,
onTorrentInList: true,
onTorrentInDetail: true
onTorrentInDetail: false
},
ircAnnounce: {
enable: true,