Created
March 23, 2018 19:31
-
-
Save rightisleft/1af491db1fa7f714f5a6a64392d12269 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
| public async testConnection(): Promise<Connection> { | |
| await this.sleep(1000); | |
| try { | |
| console.log("Testing for valid connection to database..", await getConnectionOptions() ); | |
| connection = await createConnection(); | |
| return connection; | |
| } catch (e) { | |
| getConnectionManager().get().close(); | |
| console.log("Error encountered - waiting to try again - "); | |
| console.log(e); | |
| return null; | |
| } | |
| } |
Author
rightisleft
commented
Mar 23, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment