mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Update timers
This commit is contained in:
parent
04a641adc2
commit
49e334521d
@ -24,8 +24,7 @@ class SessionService extends BaseService {
|
|||||||
// TODO: change to 5 minutes or configured value
|
// TODO: change to 5 minutes or configured value
|
||||||
asyncSafeSetInterval(async () => {
|
asyncSafeSetInterval(async () => {
|
||||||
await this._update_sessions();
|
await this._update_sessions();
|
||||||
}, 1000);
|
}, 2 * MINUTE);
|
||||||
// }, 2 * MINUTE);
|
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,8 +118,7 @@ class SessionService extends BaseService {
|
|||||||
|
|
||||||
for ( const key of keys ) {
|
for ( const key of keys ) {
|
||||||
const session = this.sessions[key];
|
const session = this.sessions[key];
|
||||||
// if ( now - session.last_store > 5 * MINUTE ) {
|
if ( now - session.last_store > 5 * MINUTE ) {
|
||||||
if ( now - session.last_store > 20 * SECOND ) {
|
|
||||||
this.log.debug('storing session meta: ' + session.uuid);
|
this.log.debug('storing session meta: ' + session.uuid);
|
||||||
const unix_ts = Math.floor(now / 1000);
|
const unix_ts = Math.floor(now / 1000);
|
||||||
await this.db.write(
|
await this.db.write(
|
||||||
|
Loading…
Reference in New Issue
Block a user