change to scrape frequency

This commit is contained in:
Mitchell Livingston 2007-01-17 01:06:52 +00:00
parent 7f142247b7
commit 2fa4abe63f
1 changed files with 5 additions and 5 deletions

View File

@ -116,7 +116,7 @@ tr_tracker_t * tr_trackerInit( tr_torrent_t * tor )
tc->redirectAddress = NULL;
tc->interval = 300;
tc->scrapeInterval = 600;
tc->scrapeInterval = 1200;
tc->lastError = 1;
tc->allUnreachIfError = 1;
@ -305,12 +305,12 @@ static int shouldScrape( tr_tracker_t * tc )
}
now = tr_date();
interval = 1000 * MAX( tc->scrapeInterval, 60 );
interval = 1000 * MAX( tc->scrapeInterval, 600 );
/* scrape half as often if there is no need to */
if( !tc->scrapeNeeded && !tc->lastScrapeFailed )
/* scrape more often if needed */
if( tc->scrapeNeeded || tc->lastScrapeFailed )
{
interval *= 2;
interval /= 2;
}
return now > tc->dateScrape + interval;