fix(coderd): workspaceapps: update last_used_at when workspace app reports stats (#11603)

- Adds a new query BatchUpdateLastUsedAt
- Adds calls to BatchUpdateLastUsedAt in app stats handler upon flush
- Passes a stats flush channel to apptest setup scaffolding and updates unit tests to assert modifications to LastUsedAt.
This commit is contained in:
Cian Johnston
2024-01-16 14:06:39 +00:00
committed by GitHub
parent 5bfbf9f9e6
commit d583acad00
16 changed files with 186 additions and 15 deletions

View File

@ -4,8 +4,9 @@ import (
"context"
"time"
"cdr.dev/slog"
"nhooyr.io/websocket"
"cdr.dev/slog"
)
// Heartbeat loops to ping a WebSocket to keep it alive.