diff --git a/scraper/lib/cache.js b/scraper/lib/cache.js index 60df89e..d1870ce 100644 --- a/scraper/lib/cache.js +++ b/scraper/lib/cache.js @@ -60,7 +60,7 @@ function cacheWrapMetadata(id, method) { } function cacheTrackers(method) { - return cacheWrap(memoryCache, `${TRACKERS_KEY_PREFIX}`, method, { ttl: { TRACKERS_TTL } }); + return cacheWrap(memoryCache, `${TRACKERS_KEY_PREFIX}`, method, { ttl: TRACKERS_TTL }); } module.exports = { diff --git a/scraper/lib/repository.js b/scraper/lib/repository.js index b176f00..6823ff9 100644 --- a/scraper/lib/repository.js +++ b/scraper/lib/repository.js @@ -200,12 +200,9 @@ function getUpdateSeedersTorrents() { function getNoContentsTorrents() { return Torrent.findAll({ - where: { opened: false }, + where: { opened: false, seeders: { [Op.gte]: 1 } }, limit: 500, - order: [ - ['seeders', 'DESC'], - ['uploadDate', 'DESC'] - ] + order: [[fn('RANDOM')]] }); }