Add branch overiew page (#2108)
* Add branch overiew page * fix changed method name on sub menu * remove unused code
This commit is contained in:
parent
e86a0bf3fe
commit
3ab580c8d6
21 changed files with 701 additions and 52 deletions
|
@ -77,6 +77,17 @@ func NewContext() {
|
|||
go models.SyncExternalUsers()
|
||||
}
|
||||
}
|
||||
if setting.Cron.DeletedBranchesCleanup.Enabled {
|
||||
entry, err = c.AddFunc("Remove old deleted branches", setting.Cron.DeletedBranchesCleanup.Schedule, models.RemoveOldDeletedBranches)
|
||||
if err != nil {
|
||||
log.Fatal(4, "Cron[Remove old deleted branches]: %v", err)
|
||||
}
|
||||
if setting.Cron.DeletedBranchesCleanup.RunAtStart {
|
||||
entry.Prev = time.Now()
|
||||
entry.ExecTimes++
|
||||
go models.RemoveOldDeletedBranches()
|
||||
}
|
||||
}
|
||||
c.Start()
|
||||
}
|
||||
|
||||
|
|
|
@ -365,6 +365,12 @@ var (
|
|||
Schedule string
|
||||
UpdateExisting bool
|
||||
} `ini:"cron.sync_external_users"`
|
||||
DeletedBranchesCleanup struct {
|
||||
Enabled bool
|
||||
RunAtStart bool
|
||||
Schedule string
|
||||
OlderThan time.Duration
|
||||
} `ini:"cron.deleted_branches_cleanup"`
|
||||
}{
|
||||
UpdateMirror: struct {
|
||||
Enabled bool
|
||||
|
@ -419,6 +425,17 @@ var (
|
|||
Schedule: "@every 24h",
|
||||
UpdateExisting: true,
|
||||
},
|
||||
DeletedBranchesCleanup: struct {
|
||||
Enabled bool
|
||||
RunAtStart bool
|
||||
Schedule string
|
||||
OlderThan time.Duration
|
||||
}{
|
||||
Enabled: true,
|
||||
RunAtStart: true,
|
||||
Schedule: "@every 24h",
|
||||
OlderThan: 24 * time.Hour,
|
||||
},
|
||||
}
|
||||
|
||||
// Git settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue