summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 42f1de425e..c878fbe92f 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -526,6 +526,7 @@ var (
MaxGitDiffFiles int
GCArgs []string `delim:" "`
Timeout struct {
+ Default int
Migrate int
Mirror int
Clone int
@@ -539,12 +540,14 @@ var (
MaxGitDiffFiles: 100,
GCArgs: []string{},
Timeout: struct {
+ Default int
Migrate int
Mirror int
Clone int
Pull int
GC int `ini:"GC"`
}{
+ Default: int(git.DefaultCommandExecutionTimeout / time.Second),
Migrate: 600,
Mirror: 300,
Clone: 300,
@@ -1142,6 +1145,8 @@ func NewContext() {
log.Fatal(4, "Failed to map Metrics settings: %v", err)
}
+ git.DefaultCommandExecutionTimeout = time.Duration(Git.Timeout.Default) * time.Second
+
sec = Cfg.Section("mirror")
Mirror.MinInterval = sec.Key("MIN_INTERVAL").MustDuration(10 * time.Minute)
Mirror.DefaultInterval = sec.Key("DEFAULT_INTERVAL").MustDuration(8 * time.Hour)