diff --git a/database/src/index.ts b/database/src/index.ts index 6427a30a0..2492a1306 100644 --- a/database/src/index.ts +++ b/database/src/index.ts @@ -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])