We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent5b799e8 commitbbbc2d5Copy full SHA for bbbc2d5
coderd/workspaceapps/stats.go
@@ -126,7 +126,11 @@ func (r *StatsDBReporter) Report(ctx context.Context, stats []StatsReport) error
126
returnerr
127
}
128
129
-// TODO: There should be a better way to do this.
+// 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.
134
uniqueIDs:=slice.Unique(batch.WorkspaceID)
135
iferr:=tx.BatchUpdateWorkspaceLastUsedAt(ctx, database.BatchUpdateWorkspaceLastUsedAtParams{
136
IDs:uniqueIDs,