From c0883a51a03d2f7af56c20cbf054b9106528c75f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 25 Jul 2015 07:47:43 +0800 Subject: [PATCH] mirror fix on #1111 --- models/repo.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/repo.go b/models/repo.go index 0254e8f0043..35f63e12a8a 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1037,7 +1037,7 @@ var ( // Prevent duplicate tasks. isMirrorUpdating = false isGitFscking = false - isCheckRepos = false + isCheckingRepos = false ) // MirrorUpdate checks and updates mirror repositories. @@ -1130,11 +1130,11 @@ func GitGcRepos() error { } func CheckRepoStats() { - if isCheckRepos { + if isCheckingRepos { return } - isCheckRepos = true - defer func() { isCheckRepos = false }() + isCheckingRepos = true + defer func() { isCheckingRepos = false }() // Check count watchers results_watch, err := x.Query("SELECT r.id FROM `repository` r WHERE r.num_watches!=(SELECT count(*) FROM `watch` WHERE repo_id=r.id)")