diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 437c86ff6d..e561b4f96b 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -169,12 +169,14 @@ var ( DisableGitHooks bool // Database settings - UseSQLite3 bool - UseMySQL bool - UseMSSQL bool - UsePostgreSQL bool - UseTiDB bool - LogSQL bool + UseSQLite3 bool + UseMySQL bool + UseMSSQL bool + UsePostgreSQL bool + UseTiDB bool + LogSQL bool + DBConnectRetries int + DBConnectBackoff time.Duration // Indexer settings Indexer struct { @@ -986,6 +988,8 @@ func NewContext() { } IterateBufferSize = Cfg.Section("database").Key("ITERATE_BUFFER_SIZE").MustInt(50) LogSQL = Cfg.Section("database").Key("LOG_SQL").MustBool(true) + DBConnectRetries = Cfg.Section("database").Key("DB_RETRIES").MustInt(10) + DBConnectBackoff = Cfg.Section("database").Key("DB_RETRY_BACKOFF").MustDuration(3 * time.Second) sec = Cfg.Section("attachment") AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments")) |