Skip to content

Commit b714d69

Browse files
committed
improve comment
1 parent f522ea6 commit b714d69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

coderd/workspaceapps/stats.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ func (r *StatsDBReporter) Report(ctx context.Context, stats []StatsReport) error
126126
return err
127127
}
128128

129-
// TODO: There should be a better way to do this.
129+
// TODO: We currently measure workspace usage based on when we get stats from it.
130+
// There are currently two paths for this:
131+
// 1) From SSH -> workspace agent stats POSTed from agent
132+
// 2) From workspace apps / rpty -> workspace app stats (from coderd / wsproxy)
133+
// Ideally we would have a single code path for this.
130134
uniqueIDs := slice.Unique(batch.WorkspaceID)
131135
if err := tx.BatchUpdateWorkspaceLastUsedAt(ctx, database.BatchUpdateWorkspaceLastUsedAtParams{
132136
IDs: uniqueIDs,

0 commit comments

Comments
 (0)