Remove rate limit config
This commit is contained in:
@@ -28,8 +28,10 @@ func NetworkTest() {
|
|||||||
logPath := fmt.Sprintf("logs/network-test-%s-%s.log", dateStr, timeStr)
|
logPath := fmt.Sprintf("logs/network-test-%s-%s.log", dateStr, timeStr)
|
||||||
log := logutil.NewLogger(logPath)
|
log := logutil.NewLogger(logPath)
|
||||||
|
|
||||||
repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, os.Getenv("PROXY"), log.Named("network_test"))
|
proxyURL := os.Getenv("PROXY")
|
||||||
repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, os.Getenv("PROXY"), log.Named("network_test"))
|
|
||||||
|
repoClient4 := http.NewHTTPClient("", 0, 1, false, []string{}, proxyURL, log.Named("network_test"))
|
||||||
|
repoClient6 := http.NewHTTPClient("", 0, 1, true, []string{}, proxyURL, log.Named("network_test"))
|
||||||
repo := http.NewIPRepository(repoClient4, repoClient6, log.Named("network_test"))
|
repo := http.NewIPRepository(repoClient4, repoClient6, log.Named("network_test"))
|
||||||
repo.NetworkTest(true)
|
repo.NetworkTest(true)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ type ConfigInterface interface {
|
|||||||
GetApiTimeoutSecs() int
|
GetApiTimeoutSecs() int
|
||||||
GetDownloadTimeoutSecs() int
|
GetDownloadTimeoutSecs() int
|
||||||
GetRetriesUntilFailed() int
|
GetRetriesUntilFailed() int
|
||||||
GetRateLimitSleepSecs() int
|
|
||||||
GetRarAction() string
|
GetRarAction() string
|
||||||
GetDownloadsEveryMins() int
|
GetDownloadsEveryMins() int
|
||||||
GetDumpTorrentsEveryMins() int
|
GetDumpTorrentsEveryMins() int
|
||||||
@@ -55,8 +54,6 @@ type ZurgConfig struct {
|
|||||||
Password string `yaml:"password" json:"password"`
|
Password string `yaml:"password" json:"password"`
|
||||||
PlayableExtensions []string `yaml:"addl_playable_extensions" json:"addl_playable_extensions"`
|
PlayableExtensions []string `yaml:"addl_playable_extensions" json:"addl_playable_extensions"`
|
||||||
Port string `yaml:"port" json:"port"`
|
Port string `yaml:"port" json:"port"`
|
||||||
Proxy string `yaml:"proxy" json:"proxy"`
|
|
||||||
RateLimitSleepSecs int `yaml:"rate_limit_sleep_secs" json:"rate_limit_sleep_secs"`
|
|
||||||
RefreshEverySecs int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"`
|
RefreshEverySecs int `yaml:"check_for_changes_every_secs" json:"check_for_changes_every_secs"`
|
||||||
RepairEveryMins int `yaml:"repair_every_mins" json:"repair_every_mins"`
|
RepairEveryMins int `yaml:"repair_every_mins" json:"repair_every_mins"`
|
||||||
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension" json:"retain_folder_name_extension"`
|
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension" json:"retain_folder_name_extension"`
|
||||||
@@ -191,13 +188,6 @@ func (z *ZurgConfig) GetDownloadTimeoutSecs() int {
|
|||||||
return z.DownloadTimeoutSecs
|
return z.DownloadTimeoutSecs
|
||||||
}
|
}
|
||||||
|
|
||||||
func (z *ZurgConfig) GetRateLimitSleepSecs() int {
|
|
||||||
if z.RateLimitSleepSecs == 0 {
|
|
||||||
return 4
|
|
||||||
}
|
|
||||||
return z.RateLimitSleepSecs
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetRarAction returns the action to take when a rar'ed torrent is found
|
// GetRarAction returns the action to take when a rar'ed torrent is found
|
||||||
// none: do nothing (mark as unrepairable)
|
// none: do nothing (mark as unrepairable)
|
||||||
// extract: extract the rar'ed torrent
|
// extract: extract the rar'ed torrent
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
|||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="21">Config</td>
|
<td rowspan="20">Config</td>
|
||||||
<td>Version</td>
|
<td>Version</td>
|
||||||
<td>%s</td>
|
<td>%s</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -230,10 +230,6 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
|||||||
<td>Download Timeout</td>
|
<td>Download Timeout</td>
|
||||||
<td>%d secs</td>
|
<td>%d secs</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>Rate Limit Sleep for...</td>
|
|
||||||
<td>%d secs</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Retries Until Failed</td>
|
<td>Retries Until Failed</td>
|
||||||
<td>%d</td>
|
<td>%d</td>
|
||||||
@@ -340,7 +336,6 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
|||||||
response.Config.GetDumpTorrentsEveryMins(),
|
response.Config.GetDumpTorrentsEveryMins(),
|
||||||
response.Config.GetApiTimeoutSecs(),
|
response.Config.GetApiTimeoutSecs(),
|
||||||
response.Config.GetDownloadTimeoutSecs(),
|
response.Config.GetDownloadTimeoutSecs(),
|
||||||
response.Config.GetRateLimitSleepSecs(),
|
|
||||||
response.Config.GetRetriesUntilFailed(),
|
response.Config.GetRetriesUntilFailed(),
|
||||||
response.Config.GetNetworkBufferSize(),
|
response.Config.GetNetworkBufferSize(),
|
||||||
response.Config.ShouldServeFromRclone(),
|
response.Config.ShouldServeFromRclone(),
|
||||||
|
|||||||
Reference in New Issue
Block a user