mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-28 01:00:59 +01:00
opt(announce): optimization announce data
This commit is contained in:
@@ -515,7 +515,7 @@ exports.getUserSeeding = function (req, res) {
|
||||
Peer.find({
|
||||
user: req.model._id,
|
||||
peer_status: PEERSTATE_SEEDER,
|
||||
last_announce_at: {$gt: Date.now() - announceConfig.announceInterval * 2}
|
||||
last_announce_at: {$gt: Date.now() - announceConfig.announceInterval - 60 * 1000}
|
||||
}).sort('-peer_uploaded')
|
||||
.populate({
|
||||
path: 'torrent',
|
||||
@@ -544,7 +544,7 @@ exports.getUserLeeching = function (req, res) {
|
||||
Peer.find({
|
||||
user: req.model._id,
|
||||
peer_status: PEERSTATE_LEECHER,
|
||||
last_announce_at: {$gt: Date.now() - announceConfig.announceInterval * 2}
|
||||
last_announce_at: {$gt: Date.now() - announceConfig.announceInterval - 60 * 1000}
|
||||
}).sort('-peer_downloaded')
|
||||
.populate({
|
||||
path: 'torrent',
|
||||
|
||||
Reference in New Issue
Block a user