We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c7fea7 commit 6b04abfCopy full SHA for 6b04abf
app/admin.js
@@ -424,7 +424,9 @@ const run = co(function *(testArgs) {
424
yield handleRecoveryInfo(args);
425
}
426
427
- db.connection.close();
+ if (db && db.connection) {
428
+ db.connection.close();
429
+ }
430
});
431
432
// For admin script and unit testing of functions
bin/admin.js
@@ -4,10 +4,8 @@ const Promise = require('bluebird');
4
const admin = require('../app/admin');
5
6
Promise.try(admin.run).catch(function(e) {
7
- console.log('Error connecting to database, proceeding offline...');
8
- try {
+ console.log(e.message);
+ if (admin.db && admin.db.connection) {
9
admin.db.connection.close();
10
- } catch(e) {
11
-
12
13
0 commit comments