You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

migrations.go 786 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package setting
  5. var (
  6. // Migrations settings
  7. Migrations = struct {
  8. MaxAttempts int
  9. RetryBackoff int
  10. Proxy string
  11. Username string
  12. Password string
  13. }{
  14. MaxAttempts: 3,
  15. RetryBackoff: 3,
  16. }
  17. )
  18. func newMigrationsService() {
  19. sec := Cfg.Section("migrations")
  20. Migrations.MaxAttempts = sec.Key("MAX_ATTEMPTS").MustInt(Migrations.MaxAttempts)
  21. Migrations.RetryBackoff = sec.Key("RETRY_BACKOFF").MustInt(Migrations.RetryBackoff)
  22. Migrations.Proxy = sec.Key("Proxy").MustString("")
  23. Migrations.Username = sec.Key("Username").MustString("")
  24. Migrations.Password = sec.Key("Password").MustString("")
  25. }