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

Method close

hubcmdui/database/database.js:340–356  ·  view source on GitHub ↗

* 关闭数据库连接

()

Source from the content-addressed store, hash-verified

338 * 关闭数据库连接
339 */
340 async close() {
341 return new Promise((resolve, reject) => {
342 if (this.db) {
343 this.db.close((err) => {
344 if (err) {
345 logger.error('关闭数据库连接失败:', err);
346 reject(err);
347 } else {
348 logger.info('数据库连接已关闭');
349 resolve();
350 }
351 });
352 } else {
353 resolve();
354 }
355 });
356 }
357
358 /**
359 * 清理过期的会话

Callers 6

getDatabaseStatsFunction · 0.95
gracefulShutdownFunction · 0.80
downloadImageFunction · 0.80
app.jsFile · 0.80
checkCompleteFunction · 0.80
stopMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected