Skip to content

Commit

Permalink
Close sql connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Irene Alvarado committed Apr 12, 2021
1 parent 4be2496 commit 94f93e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backends/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ export default async function fetchSQL(config: SQLConfig): Promise<string> {
throw error
}

core.info('Closing database')
try {
await connection.close();
} catch (error) {
core.setFailed(`Unable to close database: ${error.message}`)
throw error
}

const outfile = `${config.outfile_basename}.${config.sql_format}`
try {
switch (config.sql_format) {
Expand Down

0 comments on commit 94f93e8

Please sign in to comment.