mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] fixes trackers cache method ttl
This commit is contained in:
@@ -60,7 +60,7 @@ function cacheWrapMetadata(id, method) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cacheTrackers(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 = {
|
module.exports = {
|
||||||
|
|||||||
@@ -200,12 +200,9 @@ function getUpdateSeedersTorrents() {
|
|||||||
|
|
||||||
function getNoContentsTorrents() {
|
function getNoContentsTorrents() {
|
||||||
return Torrent.findAll({
|
return Torrent.findAll({
|
||||||
where: { opened: false },
|
where: { opened: false, seeders: { [Op.gte]: 1 } },
|
||||||
limit: 500,
|
limit: 500,
|
||||||
order: [
|
order: [[fn('RANDOM')]]
|
||||||
['seeders', 'DESC'],
|
|
||||||
['uploadDate', 'DESC']
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user