@@ -59,10 +59,6 @@ func StatsCorrectSQL(ctx context.Context, sql string, id int64) error {
5959 return err
6060}
6161
62- func repoStatsCorrectNumWatches (ctx context.Context , id int64 ) error {
63- return StatsCorrectSQL (ctx , "UPDATE `repository` SET num_watches=(SELECT COUNT(*) FROM `watch` WHERE repo_id=? AND mode<>2) WHERE id=?" , id )
64- }
65-
6662func repoStatsCorrectNumStars (ctx context.Context , id int64 ) error {
6763 return StatsCorrectSQL (ctx , "UPDATE `repository` SET num_stars=(SELECT COUNT(*) FROM `star` WHERE repo_id=?) WHERE id=?" , id )
6864}
@@ -139,12 +135,6 @@ func CheckRepoStats(ctx context.Context) error {
139135 log .Trace ("Doing: CheckRepoStats" )
140136
141137 checkers := []* repoChecker {
142- // Repository.NumWatches
143- {
144- statsQuery ("SELECT repo.id FROM `repository` repo WHERE repo.num_watches!=(SELECT COUNT(*) FROM `watch` WHERE repo_id=repo.id AND mode<>2)" ),
145- repoStatsCorrectNumWatches ,
146- "repository count 'num_watches'" ,
147- },
148138 // Repository.NumStars
149139 {
150140 statsQuery ("SELECT repo.id FROM `repository` repo WHERE repo.num_stars!=(SELECT COUNT(*) FROM `star` WHERE repo_id=repo.id)" ),
@@ -259,7 +249,6 @@ func UpdateRepoStats(ctx context.Context, id int64) error {
259249 var err error
260250
261251 for _ , f := range []func (ctx context.Context , id int64 ) error {
262- repoStatsCorrectNumWatches ,
263252 repoStatsCorrectNumStars ,
264253 repoStatsCorrectNumIssues ,
265254 repoStatsCorrectNumPulls ,
0 commit comments