mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Try disconnect.
This commit is contained in:
parent
6efd85ece3
commit
7c06a73912
1 changed files with 7 additions and 4 deletions
|
|
@ -8,7 +8,6 @@ const options = {
|
|||
level: 'query',
|
||||
},
|
||||
],
|
||||
forceTransactions: true,
|
||||
};
|
||||
|
||||
function logQuery(e) {
|
||||
|
|
@ -34,7 +33,11 @@ if (process.env.NODE_ENV === 'production') {
|
|||
export default prisma;
|
||||
|
||||
export async function runQuery(query) {
|
||||
return query.catch(e => {
|
||||
return query
|
||||
.catch(e => {
|
||||
throw e;
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue