From 8f9bb5bed2caa1fcb61533b6f7bd7ac1bbe35df2 Mon Sep 17 00:00:00 2001 From: welefen Date: Thu, 10 Jul 2014 20:14:16 +0800 Subject: [PATCH] =?UTF-8?q?controller=E9=87=8C=E6=B7=BB=E5=8A=A0closeDb?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Lib/Core/Controller.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Lib/Core/Controller.js b/lib/Lib/Core/Controller.js index 99f00e5d..c50b2228 100644 --- a/lib/Lib/Core/Controller.js +++ b/lib/Lib/Core/Controller.js @@ -430,6 +430,13 @@ module.exports = Class(function() { this.end(obj); return getDefer().promise; }, + /** + * 关闭数据库连接 + * @return {[type]} [description] + */ + closeDb: function(){ + thinkRequire('Model').close(); + }, /** * 发送执行时间 * @param {[type]} name [description]