File tree Expand file tree Collapse file tree
changelog.d/0-release-notes
services/gundeck/src/Gundeck/Presence Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Operators must:
1111- Add the new required configuration `gundeck.config.postgresql` (plus
1212 `postgresqlPool`, and optionally `secrets.pgPassword` for the password file),
1313 following the same format as brig's postgresql settings.
14- - Presence data does not carry over: the presence cache starts empty on
15- upgrade and refills as clients reconnect.
16- - The `redis-ephemeral` and `reaper` helm charts have been removed.
14+ - Restart all cannons after deployment is successful. Presence data does
15+ not carry over, this will make sure all clients reconnect after the
16+ presence data is being written to PostgreSQL.
17+ - Stop deploying `redis-ephemeral` and `reaper`, these have been removed.
Original file line number Diff line number Diff line change @@ -100,10 +100,7 @@ deleteAll pp =
100100-- presence rows; this only guards against leaks from abnormally dead pods
101101-- (replaces the redis key TTL).
102102cleanup :: Gundeck ()
103- cleanup = do
104- nowMs <- posixTime
105- let cutoff = msToUtc (fromIntegral (ms nowMs - 7 * 24 * 60 * 60 * 1000 ))
106- runPool $ statement cutoff deleteStale
103+ cleanup = runPool $ statement () deleteStale
107104
108105-- Helpers -------------------------------------------------------------------
109106
@@ -170,9 +167,9 @@ deleteMany =
170167 AND p.created_at <= d.created_at
171168 |]
172169
173- deleteStale :: Statement UTCTime ()
170+ deleteStale :: Statement () ()
174171deleteStale =
175172 [resultlessStatement |
176173 DELETE FROM presence
177- WHERE created_at < ($1 :: timestamptz)
174+ WHERE created_at < now() - interval '7 days'
178175 |]
You can’t perform that action at this time.
0 commit comments