mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: add periodic cleanup of PG Coordinator state (#8142)
* PG Coordinator cleans orphaned state Signed-off-by: Spike Curtis <spike@coder.com> * Don't need pubsub Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@ -77,3 +77,8 @@ DO UPDATE SET
|
||||
id = $1,
|
||||
heartbeat_at = now() at time zone 'utc'
|
||||
RETURNING *;
|
||||
|
||||
-- name: CleanTailnetCoordinators :exec
|
||||
DELETE
|
||||
FROM tailnet_coordinators
|
||||
WHERE heartbeat_at < now() - INTERVAL '24 HOURS';
|
||||
|
Reference in New Issue
Block a user