|
|
@ -526,6 +526,7 @@ var ( |
|
|
|
MaxGitDiffFiles int |
|
|
|
MaxGitDiffFiles int |
|
|
|
GCArgs []string `delim:" "` |
|
|
|
GCArgs []string `delim:" "` |
|
|
|
Timeout struct { |
|
|
|
Timeout struct { |
|
|
|
|
|
|
|
Default int |
|
|
|
Migrate int |
|
|
|
Migrate int |
|
|
|
Mirror int |
|
|
|
Mirror int |
|
|
|
Clone int |
|
|
|
Clone int |
|
|
@ -539,12 +540,14 @@ var ( |
|
|
|
MaxGitDiffFiles: 100, |
|
|
|
MaxGitDiffFiles: 100, |
|
|
|
GCArgs: []string{}, |
|
|
|
GCArgs: []string{}, |
|
|
|
Timeout: struct { |
|
|
|
Timeout: struct { |
|
|
|
|
|
|
|
Default int |
|
|
|
Migrate int |
|
|
|
Migrate int |
|
|
|
Mirror int |
|
|
|
Mirror int |
|
|
|
Clone int |
|
|
|
Clone int |
|
|
|
Pull int |
|
|
|
Pull int |
|
|
|
GC int `ini:"GC"` |
|
|
|
GC int `ini:"GC"` |
|
|
|
}{ |
|
|
|
}{ |
|
|
|
|
|
|
|
Default: int(git.DefaultCommandExecutionTimeout / time.Second), |
|
|
|
Migrate: 600, |
|
|
|
Migrate: 600, |
|
|
|
Mirror: 300, |
|
|
|
Mirror: 300, |
|
|
|
Clone: 300, |
|
|
|
Clone: 300, |
|
|
@ -1142,6 +1145,8 @@ func NewContext() { |
|
|
|
log.Fatal(4, "Failed to map Metrics settings: %v", err) |
|
|
|
log.Fatal(4, "Failed to map Metrics settings: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git.DefaultCommandExecutionTimeout = time.Duration(Git.Timeout.Default) * time.Second |
|
|
|
|
|
|
|
|
|
|
|
sec = Cfg.Section("mirror") |
|
|
|
sec = Cfg.Section("mirror") |
|
|
|
Mirror.MinInterval = sec.Key("MIN_INTERVAL").MustDuration(10 * time.Minute) |
|
|
|
Mirror.MinInterval = sec.Key("MIN_INTERVAL").MustDuration(10 * time.Minute) |
|
|
|
Mirror.DefaultInterval = sec.Key("DEFAULT_INTERVAL").MustDuration(8 * time.Hour) |
|
|
|
Mirror.DefaultInterval = sec.Key("DEFAULT_INTERVAL").MustDuration(8 * time.Hour) |
|
|
|