fix: Only update workspace LastUsed when the connection payload has changed (#4115)

This was causing every workspace to update last used to time.Now() when
coderd was restarted!
This commit is contained in:
Kyle Carberry
2022-09-19 14:11:18 -05:00
committed by GitHub
parent 153e96f574
commit 72d6731924
5 changed files with 63 additions and 1 deletions
+3
View File
@@ -12,6 +12,9 @@ INSERT INTO
VALUES
($1, $2, $3, $4, $5, $6, $7) RETURNING *;
-- name: GetLatestAgentStat :one
SELECT * FROM agent_stats WHERE agent_id = $1 ORDER BY created_at DESC LIMIT 1;
-- name: GetTemplateDAUs :many
select
(created_at at TIME ZONE 'UTC')::date as date,