fix(core): Close db connection gracefully when exiting (#8045)

Close db connection gracefully when exiting
This commit is contained in:
Tomi Turtiainen 2023-12-15 17:16:35 +02:00 committed by GitHub
parent 48d4f4a71b
commit e69707efd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,7 @@ export abstract class BaseCommand extends Command {
protected async exitSuccessFully() {
try {
await CrashJournal.cleanup();
await Promise.all([CrashJournal.cleanup(), Db.close()]);
} finally {
process.exit();
}