MCPcopy Index your code
hub / github.com/ether/etherpad / _scheduleCleanup

Method _scheduleCleanup

src/node/db/SessionStore.ts:61–73  ·  view source on GitHub ↗
(delay: number)

Source from the content-addressed store, hash-verified

59 }
60
61 _scheduleCleanup(delay: number) {
62 this._cleanupTimer = setTimeout(async () => {
63 try {
64 await this._cleanup();
65 } catch (err) {
66 logger.error('Session cleanup error:', err);
67 }
68 // Schedule the next run only after this one completes.
69 this._scheduleCleanup(CLEANUP_INTERVAL_MS);
70 }, delay);
71 // Don't prevent Node.js from exiting.
72 if (this._cleanupTimer.unref) this._cleanupTimer.unref();
73 }
74
75 shutdown() {
76 for (const {timeout} of this._expirations.values()) clearTimeout(timeout);

Callers 1

startCleanupMethod · 0.95

Calls 1

_cleanupMethod · 0.95

Tested by

no test coverage detected