Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirror sync interval specified as duration string #1407

Merged
merged 14 commits into from
Apr 8, 2017
4 changes: 2 additions & 2 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,8 @@ please consider changing to GITEA_CUSTOM`)
}

sec = Cfg.Section("mirror")
Mirror.MinInterval = sec.Key("MIN_INTERVAL").MustDuration(time.Second * 55)
Mirror.DefaultInterval = sec.Key("DEFAULT_INTERVAL").MustDuration(time.Hour * 55)
Mirror.MinInterval = sec.Key("MIN_INTERVAL").MustDuration()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm somethings not right with this. Doesn't read default from built in app.ini

Mirror.DefaultInterval = sec.Key("DEFAULT_INTERVAL").MustDuration()
if Mirror.MinInterval.Minutes() < 1 {
log.Warn("Invalid Mirror.MinInterval")
Mirror.MinInterval = time.Second * 60
Expand Down