ws: record daily repo stats history alongside current upsert
This commit is contained in:
@@ -339,6 +339,10 @@ func dispatchAgentMessage(ctx context.Context, c *Conn, hostID string, env api.E
|
||||
} else {
|
||||
slog.Info("ws: repo stats refreshed", "host_id", hostID)
|
||||
}
|
||||
day := time.Now().UTC().Format("2006-01-02")
|
||||
if err := deps.Store.UpsertHostRepoStatsHistory(ctx, hostID, day, patch, time.Now().UTC()); err != nil {
|
||||
slog.Warn("ws: upsert host repo stats history", "host_id", hostID, "err", err)
|
||||
}
|
||||
|
||||
case api.MsgCommandResult:
|
||||
// TODO(P2): persist command.result acks for "did the agent
|
||||
|
||||
Reference in New Issue
Block a user