Created
August 29, 2017 22:34
-
-
Save cicorias/9350033da9e5ebcb68fc5f69f97396a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// let tries = 0; | |
// function connectSql() { | |
// sql.globalConnection.connect(config.get('db.connectionstring')) | |
// .then( (pool) => { | |
// winston.warn('connected....'); | |
// }) | |
// .catch((err) => { | |
// tries++; | |
// winston.error(`Error creating connection pool: at ${tries} tries`); | |
// setTimeout(connectSql, 5000); | |
// // throw err; | |
// }); | |
// } | |
process.on('unhandledRejection', (reason, p) => { | |
winston.debug('Unhandled Rejection at: Promise', p, 'reason:', reason); | |
// application specific logging, throwing an error, or other logic here | |
}); | |
// connectSql(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment