mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-21 23:48:11 -07:00
config: make reaping configurable
This allows for configurable reaping rates and changes the default to what many public trackers use in the wild.
This commit is contained in:
@@ -81,6 +81,8 @@ type TrackerConfig struct {
|
||||
PurgeInactiveTorrents bool `json:"purge_inactive_torrents"`
|
||||
Announce Duration `json:"announce"`
|
||||
MinAnnounce Duration `json:"min_announce"`
|
||||
ReapInterval Duration `json:"reap_interval"`
|
||||
ReapRatio float64 `json:"reap_ratio"`
|
||||
NumWantFallback int `json:"default_num_want"`
|
||||
TorrentMapShards int `json:"torrent_map_shards"`
|
||||
|
||||
@@ -121,6 +123,8 @@ var DefaultConfig = Config{
|
||||
PurgeInactiveTorrents: true,
|
||||
Announce: Duration{30 * time.Minute},
|
||||
MinAnnounce: Duration{15 * time.Minute},
|
||||
ReapInterval: Duration{60 * time.Second},
|
||||
ReapRatio: 1.25,
|
||||
NumWantFallback: 50,
|
||||
TorrentMapShards: 1,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user