end connections to db gracefully

This commit is contained in:
Ulf Gebhardt 2021-10-20 13:13:37 +02:00
parent 8578ca9e51
commit f1a7575f37
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -50,6 +50,10 @@ const run = async (command: string) => {
default:
throw new Error(`Unsupported command ${command}`)
}
// Terminate connections gracefully
await con.close()
pool.end()
}
run(process.argv[2])