Skip to content

Commit 7398344

Browse files
Completed complete clean up logic - deleting session from Redis and Updated PostgreSQL database for archived sessions on forced shutdowns
1 parent 17908f5 commit 7398344

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmd/laclm/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ func run(ctx context.Context) error {
235235

236236
/* after the http server is stopped, rest of the components can be shutdown */
237237

238+
usernames := sessionManager.GetAllUsernames()
239+
for _, username := range usernames {
240+
sessionManager.ExpireSession(username)
241+
zap.L().Info("Session forced expired for: ",
242+
zap.String("username", username),
243+
)
244+
}
245+
238246
wg.Wait()
239247

240248
/* close archival database connection */

0 commit comments

Comments
 (0)