fix: cleanup prisma engine if there is more than 1
This commit is contained in:
parent
ddd09412cd
commit
5d5a478cd1
@ -5,7 +5,10 @@ import { asyncExecShell, isDev, prisma } from '../lib/common';
|
||||
if (parentPort) {
|
||||
if (!isDev) {
|
||||
try {
|
||||
await asyncExecShell(`killall -q -e /app/prisma-engines/query-engine -o 10m`)
|
||||
const { stdout } = await asyncExecShell(`ps -ef | grep /app/prisma-engines/query-engine | grep -v grep | wc -l | xargs`)
|
||||
if (stdout.trim() != null && stdout.trim() != '' && Number(stdout.trim()) > 1) {
|
||||
await asyncExecShell(`killall -q -e /app/prisma-engines/query-engine -o 10m`)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
|
@ -37,6 +37,7 @@ const options: any = {
|
||||
},
|
||||
{
|
||||
name: 'cleanupPrismaEngines',
|
||||
interval: '1m'
|
||||
},
|
||||
{
|
||||
name: 'checkProxies',
|
||||
|
Loading…
x
Reference in New Issue
Block a user