Update timers

This commit is contained in:
KernelDeimos 2024-04-17 12:41:43 -04:00
parent 04a641adc2
commit 49e334521d

View File

@ -24,8 +24,7 @@ class SessionService extends BaseService {
// TODO: change to 5 minutes or configured value
asyncSafeSetInterval(async () => {
await this._update_sessions();
}, 1000);
// }, 2 * MINUTE);
}, 2 * MINUTE);
})();
}
@ -119,8 +118,7 @@ class SessionService extends BaseService {
for ( const key of keys ) {
const session = this.sessions[key];
// if ( now - session.last_store > 5 * MINUTE ) {
if ( now - session.last_store > 20 * SECOND ) {
if ( now - session.last_store > 5 * MINUTE ) {
this.log.debug('storing session meta: ' + session.uuid);
const unix_ts = Math.floor(now / 1000);
await this.db.write(