mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Make database open attempts configurable also via config file
This commit is contained in:
committed by
Andrey Smirnov
parent
586f879e80
commit
98e75f6d97
@@ -259,7 +259,13 @@ func (context *AptlyContext) _database() (database.Storage, error) {
|
||||
}
|
||||
}
|
||||
|
||||
tries := context.flags.Lookup("db-open-attempts").Value.Get().(int)
|
||||
var tries int
|
||||
if context.config().DatabaseOpenAttempts == -1 {
|
||||
tries = context.flags.Lookup("db-open-attempts").Value.Get().(int)
|
||||
} else {
|
||||
tries = context.config().DatabaseOpenAttempts
|
||||
}
|
||||
|
||||
const BaseDelay = 10 * time.Second
|
||||
const Jitter = 1 * time.Second
|
||||
|
||||
|
||||
Reference in New Issue
Block a user