mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Rework HTTP downloader retry logic
Apply retries as global, config-level option `downloadRetries` so that it can be applied to any aptly command which downloads objects. Unwrap `errors.Wrap` which is used in downloader. Unwrap `*url.Error` which should be the actual error returned from the HTTP client, catch more cases, be more specific around failures.
This commit is contained in:
committed by
Andrey Smirnov
parent
2e7f624b34
commit
f0a370db24
@@ -11,6 +11,7 @@ type ConfigStructure struct { // nolint: maligned
|
||||
RootDir string `json:"rootDir"`
|
||||
DownloadConcurrency int `json:"downloadConcurrency"`
|
||||
DownloadLimit int64 `json:"downloadSpeedLimit"`
|
||||
DownloadRetries int `json:"downloadRetries"`
|
||||
Architectures []string `json:"architectures"`
|
||||
DepFollowSuggests bool `json:"dependencyFollowSuggests"`
|
||||
DepFollowRecommends bool `json:"dependencyFollowRecommends"`
|
||||
|
||||
@@ -57,6 +57,7 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
" \"rootDir\": \"/tmp/aptly\",\n"+
|
||||
" \"downloadConcurrency\": 5,\n"+
|
||||
" \"downloadSpeedLimit\": 0,\n"+
|
||||
" \"downloadRetries\": 0,\n"+
|
||||
" \"architectures\": null,\n"+
|
||||
" \"dependencyFollowSuggests\": false,\n"+
|
||||
" \"dependencyFollowRecommends\": false,\n"+
|
||||
|
||||
Reference in New Issue
Block a user