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

migrations.go 552B

12345678910111213141516171819202122
  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. }{
  11. MaxAttempts: 3,
  12. RetryBackoff: 3,
  13. }
  14. )
  15. func newMigrationsService() {
  16. sec := Cfg.Section("migrations")
  17. Migrations.MaxAttempts = sec.Key("MAX_ATTEMPTS").MustInt(Migrations.MaxAttempts)
  18. Migrations.RetryBackoff = sec.Key("RETRY_BACKOFF").MustInt(Migrations.RetryBackoff)
  19. }