added missing lock

This commit is contained in:
2021-10-09 19:27:57 +02:00
parent 22cf3eb4b2
commit 1cf61d8c74

View File

@@ -141,7 +141,9 @@ func housekeeping() {
}
// try parsing demos not parsed
db.Lock.RLock()
tMatches, err := db.Client.Match.Query().Where(match.And(match.DateGT(time.Now().UTC().AddDate(0, 0, -30)), match.DemoParsed(false))).All(context.Background())
db.Lock.RUnlock()
if err != nil {
log.Warningf("[HK] Failure getting matches to retry parsing: %v", err)
continue