Skip to content

Commit 1e8d895

Browse files
committed
chore: add debugging statements to logs for save state playtimes
1 parent b3196c0 commit 1e8d895

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

services/map-service/api/v3/intnl/server_savestate.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ func (s *server) UpdateSaveState(ctx context.Context, request UpdateSaveStateReq
175175
return nil, nil
176176
}
177177

178+
if ss.Playtime == 0 && update.Completed {
179+
s.log.Warnw("save state being completed with zero playtime", "mapId", request.MapId, "playerId", request.PlayerId, "saveStateId", request.SaveStateId)
180+
}
181+
178182
// If the save state is completed never store the play/edit state of it.
179183
if update.Completed {
180184
update.StateV2 = []byte("null")
@@ -199,7 +203,7 @@ func (s *server) UpdateSaveState(ctx context.Context, request UpdateSaveStateReq
199203
go s.store.UpdateMapStats(context.TODO(), ss.MapID) // todo figure out this context since it's done in the background, the parent context will be cancelled.
200204

201205
s.log.Infow("updated save state", "mapId", request.MapId, "playerId", request.PlayerId,
202-
"saveStateId", request.SaveStateId, "completed", update.Completed, "type", update.Type)
206+
"saveStateId", request.SaveStateId, "completed", update.Completed, "type", update.Type, "playtime", update.Playtime)
203207

204208
// If this is a verification and was just completed, we need to also update the map to verified.
205209
// todo we need to do this update as a transaction

0 commit comments

Comments
 (0)