session cleanup via background job

Signed-off-by: chandi Langecker <git@chandi.it>
This commit is contained in:
chandi Langecker
2022-11-10 17:01:06 +01:00
parent d7919497b6
commit 0ea384d1e5
5 changed files with 68 additions and 0 deletions

View File

@@ -86,6 +86,10 @@ class SessionService {
}
$this->eventDispatcher->dispatchTyped(new SessionClosedEvent($boardId, $this->userId));
}
public function removeInactiveSessions(): int {
return $this->sessionMapper->deleteInactive();
}
public function notifyAllSessions(IQueue $queue, int $boardId, $event, $excludeUserId, $body) {
$activeSessions = $this->sessionMapper->findAllActive($boardId);