Mirror sync interval specified as duration string (#1407)

* Sync interval specifed as duration string

* Changed mirror interval text

* make fmt

* Add MinInterval for mirror sync

* Use duration internally

* Changed min default to 10m

* make fmt

* Incorrect default

* Removed defaults in MustDuration()

* Add Mirror interval migration

* Default values corrected

* Use transaction during migration

* Change http 500 to page with error message

* Cleanup session.commit()
This commit is contained in:
Jonas authored and Lunny Xiao committed 2017-04-08 23:27:26 +08:00
1 parent edbb9eefd6
commit 54f0293f0a
10 files changed
+90 -21

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ type RepoSettingForm struct {
RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"`
Description string `binding:"MaxSize(255)"`
Website string `binding:"Url;MaxSize(255)"`
Interval int
Interval string
MirrorAddress string
Private bool
EnablePrune bool