aboutsummaryrefslogtreecommitdiffstats
path: root/modules/cron
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-01-02 20:14:43 +0800
committerUnknwon <joe2010xtmf@163.com>2015-01-02 20:14:43 +0800
commitc73e9057ae949bd0c0bf329b23d4e5da4ac154d0 (patch)
tree58a2d8bb67ad7b5846bbb2a17809dcef54fa6f79 /modules/cron
parent0b56272c130c88fc4441fb1cba04657fe73efc38 (diff)
downloadgitea-c73e9057ae949bd0c0bf329b23d4e5da4ac154d0.tar.gz
gitea-c73e9057ae949bd0c0bf329b23d4e5da4ac154d0.zip
Optmize git-fsck options and fix #820
Diffstat (limited to 'modules/cron')
-rw-r--r--modules/cron/manager.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/cron/manager.go b/modules/cron/manager.go
index 49b1a99cee..135fec4faa 100644
--- a/modules/cron/manager.go
+++ b/modules/cron/manager.go
@@ -16,7 +16,9 @@ var c = New()
func NewCronContext() {
c.AddFunc("Update mirrors", "@every 1h", models.MirrorUpdate)
c.AddFunc("Deliver hooks", fmt.Sprintf("@every %dm", setting.WebhookTaskInterval), models.DeliverHooks)
- c.AddFunc("Repository health check", "@every 1h", models.GitFsck)
+ if setting.Git.Fsck.Enable {
+ c.AddFunc("Repository health check", fmt.Sprintf("@every %dh", setting.Git.Fsck.Interval), models.GitFsck)
+ }
c.Start()
}