[scraper] simplify update seeders query

This commit is contained in:
TheBeastLT
2020-04-28 09:29:40 +02:00
parent 95c2893523
commit 529f5ba76c
4 changed files with 13 additions and 13 deletions

View File

@@ -16,8 +16,8 @@ function scheduleUpdateSeeders() {
return repository.getUpdateSeedersTorrents()
.then(torrents => Promise.all(torrents.map(torrent => limiter.schedule(() => _updateSeeders(torrent)))))
.then(torrents => updateStatistics(torrents))
.then(() => console.log('Finished seeders update: ', statistics))
.catch(error => console.warn('Failed seeders update: ', error))
.then(() => console.log('Finished seeders update:', statistics))
.catch(error => console.warn('Failed seeders update:', error))
.then(() => delay(DELAY))
.then(() => scheduleUpdateSeeders());
}