Fix test by reverting expired session closing logic

This commit is contained in:
Simponic 2023-01-20 23:48:34 -07:00
parent 5dbe76f6c2
commit 804d47d81d
Signed by untrusted user who does not match committer: simponic
GPG Key ID: 52B3774857EB24B1

View File

@ -86,7 +86,10 @@ defmodule Chessh.PlayerSession do
"Player #{player.username} has #{length(expired_sessions)} expired sessions - attempting to close them"
)
Enum.map(expired_sessions, &close_session/1)
Enum.map(expired_sessions, fn session_id ->
:syn.publish(:player_sessions, {:session, session_id}, :session_closed)
end)
Repo.delete_all(from(p in PlayerSession, where: p.id in ^expired_sessions))
end