chore: fix TestBatchStats flake (#8952)

This commit is contained in:
Colin Adler
2023-08-07 21:55:31 -05:00
committed by GitHub
parent 758c368222
commit 7e3ff5b66e
3 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -1414,7 +1414,7 @@ func (api *API) workspaceAgentReportStats(rw http.ResponseWriter, r *http.Reques
var errGroup errgroup.Group
errGroup.Go(func() error {
if err := api.statsBatcher.Add(workspaceAgent.ID, workspace.TemplateID, workspace.OwnerID, workspace.ID, req); err != nil {
if err := api.statsBatcher.Add(time.Now(), workspaceAgent.ID, workspace.TemplateID, workspace.OwnerID, workspace.ID, req); err != nil {
api.Logger.Error(ctx, "failed to add stats to batcher", slog.Error(err))
return xerrors.Errorf("can't insert workspace agent stat: %w", err)
}