add lastActiveDate to updateUserQueue

This commit is contained in:
Hazelnoot 2025-06-26 10:25:16 -04:00
parent 1baa9b2f9d
commit 528c0476f9
3 changed files with 33 additions and 42 deletions

View file

@ -271,11 +271,11 @@ export class StreamingApiServerService implements OnApplicationShutdown {
this.#connections.set(connection, this.timeService.now);
// TODO use collapsed queue
const userUpdateIntervalId = user ? this.timeService.startTimer(() => {
this.usersService.updateLastActiveDate(user);
const userUpdateIntervalId = user ? this.timeService.startTimer(async () => {
await this.usersService.updateLastActiveDate(user);
}, 1000 * 60 * 5, { repeated: true }) : null;
if (user) {
this.usersService.updateLastActiveDate(user);
await this.usersService.updateLastActiveDate(user);
}
const pong = () => {
this.#connections.set(connection, this.timeService.now);