mirror of
https://github.com/docmost/docmost.git
synced 2026-10-05 19:13:51 +10:00
clear interval
This commit is contained in:
@@ -235,13 +235,11 @@ export class RedisSyncExtension<TCE extends CustomEvents> implements Extension {
|
||||
};
|
||||
|
||||
async maintainLock(documentName: string) {
|
||||
clearInterval(this.locks[documentName]);
|
||||
this.locks[documentName] = setInterval(() => {
|
||||
this.pub.set(
|
||||
this.getKey(documentName),
|
||||
this.serverId,
|
||||
'PX',
|
||||
this.lockTTL,
|
||||
);
|
||||
this.pub
|
||||
.set(this.getKey(documentName), this.serverId, 'PX', this.lockTTL)
|
||||
.catch(() => {});
|
||||
}, this.lockTTL / 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user