MCPcopy
hub / github.com/dqzboy/Docker-Proxy / cleanExpiredSessions

Method cleanExpiredSessions

hubcmdui/database/database.js:361–373  ·  view source on GitHub ↗

* 清理过期的会话

()

Source from the content-addressed store, hash-verified

359 * 清理过期的会话
360 */
361 async cleanExpiredSessions() {
362 try {
363 const result = await this.run(
364 'DELETE FROM sessions WHERE expire < ?',
365 [new Date().toISOString()]
366 );
367 if (result.changes > 0) {
368 logger.info(`清理了 ${result.changes} 个过期会话`);
369 }
370 } catch (error) {
371 logger.error('清理过期会话失败:', error);
372 }
373 }
374
375 /**
376 * 创建默认菜单项

Callers 1

startSessionCleanupTaskFunction · 0.80

Calls 1

runMethod · 0.95

Tested by

no test coverage detected