more logging improvements

This commit is contained in:
2021-11-09 18:21:14 +01:00
parent c1e903f4a6
commit 0fdea7b327

View File

@@ -365,6 +365,9 @@ func (d *DemoMatchLoader) gcWorker(apiKey string, rl ratelimit.Limiter) {
continue
}
log.Infof("[DL] Requesting match %d from GC", matchId)
t := time.Now()
matchDetails, err := d.getMatchDetails(demo.ShareCode)
if err != nil {
log.Warningf("[DL] Failure to get match-details for %d from GC: %v", demo.MatchId, err)
@@ -374,6 +377,8 @@ func (d *DemoMatchLoader) gcWorker(apiKey string, rl ratelimit.Limiter) {
continue
}
log.Infof("[DL] Recieved matchdetails for match %d (%s)", matchId, time.Since(t))
matchZero := matchDetails.GetMatches()[0]
lastRound := matchZero.GetRoundstatsall()[len(matchZero.Roundstatsall)-1]
var players []*ent.Player