From 446fdf47625893ff8d9a93c04c9ccdc87afa5327 Mon Sep 17 00:00:00 2001 From: Urban Guacamole Date: Fri, 10 Jul 2020 14:10:12 +0200 Subject: [PATCH] Update seedleech params In anticipation of more new trackers (6) and significantly more torrents (2 million -> 20 million). Required seedleech freshness now updated to guarantee very fresh counts for popular torrents at the expense of torrents with 1-3 seeds. I also again changed the sleep time for workfetcher with minseed 0: computing all torrents without a trackerdata entry is computionally expensive, impossible with 20 mil torrents. --- seedleech-daemon/config.toml | 2 +- seedleech-daemon/seedleech-daemon.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/seedleech-daemon/config.toml b/seedleech-daemon/config.toml index 5544da7..69ee309 100644 --- a/seedleech-daemon/config.toml +++ b/seedleech-daemon/config.toml @@ -2,4 +2,4 @@ trackers = ["udp://tracker.coppersurfer.tk:6969", "udp://tracker.leechers-paradi waitTime = "500ms" logInterval = "5m" -categories = { 0 = "1440h", 1 = "720h", 3 = "240h", 10 = "180h", 100 = "24h", 1000 = "10h", 2000 = "4h", 3000 = "2h"} +categories = { 0 = "2880h", 1 = "1440h", 3 = "720h", 10 = "96h", 60 = "48h", 100 = "24h", 500 = "8h", 1000 = "2h"} diff --git a/seedleech-daemon/seedleech-daemon.go b/seedleech-daemon/seedleech-daemon.go index e8f9e10..0a860b1 100644 --- a/seedleech-daemon/seedleech-daemon.go +++ b/seedleech-daemon/seedleech-daemon.go @@ -105,7 +105,7 @@ func runWorkFetcher(trackerRequests chan []string, tracker string, minseed int, if minseed != 0 { rows, err = db.Query("SELECT infohash FROM trackerdata WHERE tracker = $1 AND seeders > $2 AND scraped < $3 LIMIT 630", tracker, minseed, freshlimit) } else { - time.Sleep(time.Duration(int64(rand.Intn(3000)) * int64(time.Second))) //sleep for random time between 0 mins and 50 mins + time.Sleep(time.Duration(int64(rand.Intn(12000)) * int64(time.Second))) //sleep for random time between 0 mins and 200 mins rows, err = db.Query("SELECT infohash FROM torrent WHERE NOT EXISTS (SELECT from trackerdata WHERE infohash = torrent.infohash AND tracker = $1 AND scraped > $2) LIMIT 6300", tracker, freshlimit) } if err != nil { @@ -130,7 +130,7 @@ func runWorkFetcher(trackerRequests chan []string, tracker string, minseed int, } } trackerRequests <- infohashes - time.Sleep(time.Minute) + time.Sleep(5 * time.Minute) } } @@ -192,7 +192,7 @@ func initDb() *sql.DB { _, err = db.Exec(`DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'tracker') THEN - CREATE TYPE tracker AS ENUM ('udp://tracker.coppersurfer.tk:6969', 'udp://exodus.desync.com:6969', 'udp://tracker.pirateparty.gr:6969','udp://tracker.opentrackr.org:1337/announce','udp://tracker.internetwarriors.net:1337/announce','udp://tracker.cyberia.is:6969/announce','udp://9.rarbg.to:2920/announce'); + CREATE TYPE tracker AS ENUM ('udp://tracker.coppersurfer.tk:6969', 'udp://tracker.leechers-paradise.org:6969/announce', 'udp://exodus.desync.com:6969', 'udp://tracker.pirateparty.gr:6969','udp://tracker.opentrackr.org:1337/announce','udp://tracker.internetwarriors.net:1337/announce','udp://tracker.cyberia.is:6969/announce','udp://9.rarbg.to:2920/announce'); END IF; END$$`) if err != nil {