[scraper] adds update seeders cron

This commit is contained in:
TheBeastLT
2020-04-08 15:53:02 +02:00
parent d3cc8c6b57
commit ce0e330172
10 changed files with 118 additions and 52 deletions

View File

@@ -63,6 +63,8 @@ async function updateTorrentSeeders(torrent) {
.catch(() => undefined)
.then(stored => {
if (stored) {
console.log(
`Updated seeder for ${torrent.provider} [${torrent.infoHash}] ${torrent.title} from ${stored.seeders} to ${torrent.seeders}`);
stored.seeders = torrent.seeders;
stored.changed('updatedAt', true);
return stored.save()