mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-14 03:32:06 +00:00
database: exit if initial connection fails (#500)
This commit is contained in:
parent
f2000b4459
commit
bb3b9004e0
1 changed files with 3 additions and 4 deletions
|
|
@ -24,10 +24,9 @@ module.exports.init = function () {
|
|||
|
||||
// Test the connection
|
||||
pool.getConnection(function (err, conn) {
|
||||
if(err) {
|
||||
Logger.errlog.log("! DB connection failed");
|
||||
Logger.errlog.log(err);
|
||||
return;
|
||||
if (err) {
|
||||
Logger.errlog.log("Initial database connection failed: " + err.stack);
|
||||
process.exit(1);
|
||||
} else {
|
||||
tables.init(module.exports.query, function (err) {
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue