diff options
author | Unknwon <u@gogs.io> | 2015-08-18 02:19:29 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-18 02:19:29 +0800 |
commit | b1696665bdf0e31c227493cf637d3867e102d131 (patch) | |
tree | 4dbd11c8998a8875147cf8e23b3d819d5aee080e /models/repo.go | |
parent | d17f102339c8542cfb5e81ab6a705b1b64651f51 (diff) | |
download | gitea-b1696665bdf0e31c227493cf637d3867e102d131.tar.gz gitea-b1696665bdf0e31c227493cf637d3867e102d131.zip |
make cron task configurable
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go index fb787baeac..c4304d9bee 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1108,7 +1108,7 @@ func RewriteRepositoryUpdateHook() error { } var ( - // Prevent duplicate tasks. + // Prevent duplicate running tasks. isMirrorUpdating = false isGitFscking = false isCheckingRepos = false @@ -1164,7 +1164,7 @@ func GitFsck() { isGitFscking = true defer func() { isGitFscking = false }() - args := append([]string{"fsck"}, setting.Git.Fsck.Args...) + args := append([]string{"fsck"}, setting.Cron.RepoHealthCheck.Args...) if err := x.Where("id > 0").Iterate(new(Repository), func(idx int, bean interface{}) error { repo := bean.(*Repository) @@ -1216,7 +1216,7 @@ func CheckRepoStats() { log.Error(4, "select repository check 'watch': %v", err) } for _, repo_id := range results_watch { - log.Info("updating repository count 'watch'") + log.Trace("updating repository count 'watch'") repoID := com.StrTo(repo_id["id"]).MustInt64() _, err := x.Exec("UPDATE `repository` SET num_watches=(SELECT count(*) FROM `watch` WHERE repo_id=?) WHERE id=?", repoID, repoID) if err != nil { @@ -1230,7 +1230,7 @@ func CheckRepoStats() { log.Error(4, "select repository check 'star': %v", err) } for _, repo_id := range results_star { - log.Info("updating repository count 'star'") + log.Trace("updating repository count 'star'") repoID := com.StrTo(repo_id["id"]).MustInt64() _, err := x.Exec("UPDATE `repository` SET .num_stars=(SELECT count(*) FROM `star` WHERE repo_id=?) WHERE id=?", repoID, repoID) if err != nil { |