mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-01-11 22:40:22 +00:00
revert bypassing mongo
This commit is contained in:
parent
f22df6c5cb
commit
a51ddc53c5
2 changed files with 3 additions and 3 deletions
|
|
@ -29,10 +29,10 @@ builder.defineStreamHandler((args) => {
|
|||
return Promise.resolve({ streams: [] });
|
||||
}
|
||||
|
||||
return limiter.schedule(limiterOptions, () => streamHandler(args)
|
||||
return cacheWrapStream(args.id, () => limiter.schedule(limiterOptions, () => streamHandler(args)
|
||||
.then(records => records
|
||||
.sort((a, b) => b.torrent.seeders - a.torrent.seeders || b.torrent.uploadDate - a.torrent.uploadDate)
|
||||
.map(record => toStreamInfo(record))))
|
||||
.map(record => toStreamInfo(record)))))
|
||||
.then(streams => applyFilters(streams, args.extra))
|
||||
.then(streams => applySorting(streams, args.extra, args.type))
|
||||
.then(streams => applyStaticInfo(streams))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const Op = Sequelize.Op;
|
|||
|
||||
const DATABASE_URI = process.env.DATABASE_URI;
|
||||
|
||||
const database = new Sequelize(DATABASE_URI, { logging: false, pool: { max: 100, evict: 120000} });
|
||||
const database = new Sequelize(DATABASE_URI, { logging: false, pool: { max: 50, evict: 120000 } });
|
||||
|
||||
const Torrent = database.define('torrent',
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue