MCPcopy Create free account
hub / github.com/gogs/gogs / repoStatsCheck

Function repoStatsCheck

internal/database/repo.go:2138–2152  ·  view source on GitHub ↗
(checker *repoChecker)

Source from the content-addressed store, hash-verified

2136}
2137
2138func repoStatsCheck(checker *repoChecker) {
2139 results, err := x.Query(checker.querySQL)
2140 if err != nil {
2141 log.Error("Select %s: %v", checker.desc, err)
2142 return
2143 }
2144 for _, result := range results {
2145 id := com.StrTo(result["id"]).MustInt64()
2146 log.Trace("Updating %s: %d", checker.desc, id)
2147 _, err = x.Exec(checker.correctSQL, id, id)
2148 if err != nil {
2149 log.Error("Update %s[%d]: %v", checker.desc, id, err)
2150 }
2151 }
2152}
2153
2154func CheckRepoStats() {
2155 if taskStatusTable.IsRunning(taskNameCheckRepoStats) {

Callers 1

CheckRepoStatsFunction · 0.85

Calls 2

ExecMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected