|
|
@ -1037,7 +1037,7 @@ var ( |
|
|
|
// Prevent duplicate tasks.
|
|
|
|
// Prevent duplicate tasks.
|
|
|
|
isMirrorUpdating = false |
|
|
|
isMirrorUpdating = false |
|
|
|
isGitFscking = false |
|
|
|
isGitFscking = false |
|
|
|
isCheckRepos = false |
|
|
|
isCheckingRepos = false |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// MirrorUpdate checks and updates mirror repositories.
|
|
|
|
// MirrorUpdate checks and updates mirror repositories.
|
|
|
@ -1130,11 +1130,11 @@ func GitGcRepos() error { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func CheckRepoStats() { |
|
|
|
func CheckRepoStats() { |
|
|
|
if isCheckRepos { |
|
|
|
if isCheckingRepos { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
isCheckRepos = true |
|
|
|
isCheckingRepos = true |
|
|
|
defer func() { isCheckRepos = false }() |
|
|
|
defer func() { isCheckingRepos = false }() |
|
|
|
|
|
|
|
|
|
|
|
// Check count watchers
|
|
|
|
// 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)") |
|
|
|
results_watch, err := x.Query("SELECT r.id FROM `repository` r WHERE r.num_watches!=(SELECT count(*) FROM `watch` WHERE repo_id=r.id)") |
|
|
|