add lastActiveDate to updateUserQueue
This commit is contained in:
parent
1baa9b2f9d
commit
528c0476f9
3 changed files with 33 additions and 42 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue