From ef9a10cf6550cb5b13daaa5988014878df576033 Mon Sep 17 00:00:00 2001 From: Innei Date: Sun, 25 Dec 2022 20:44:29 +0800 Subject: [PATCH] chore: update max memory restart Signed-off-by: Innei --- ecosystem.config.js | 2 +- ecosystem.dev.config.js | 2 +- pm2.dev.config.js | 20 -------------------- src/migration/helper/encrypt-configs.ts | 3 +++ 4 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 pm2.dev.config.js diff --git a/ecosystem.config.js b/ecosystem.config.js index 0233c209..98e8f0ce 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -14,7 +14,7 @@ module.exports = { exec_mode: 'cluster', watch: false, instances: cpuLen, - max_memory_restart: '200M', + max_memory_restart: '220M', args: '--color --encrypt_enable', env: { NODE_ENV: 'production', diff --git a/ecosystem.dev.config.js b/ecosystem.dev.config.js index 5554f188..276a2bef 100644 --- a/ecosystem.dev.config.js +++ b/ecosystem.dev.config.js @@ -12,7 +12,7 @@ module.exports = { exec_mode: 'cluster', watch: false, instances: 2, - max_memory_restart: '200M', + max_memory_restart: '220M', args: '--color --encrypt_enable', env: { NODE_ENV: 'development', diff --git a/pm2.dev.config.js b/pm2.dev.config.js deleted file mode 100644 index b037149b..00000000 --- a/pm2.dev.config.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - apps: [ - { - name: 'mx-server', - script: 'dist/src/main.js', - autorestart: true, - exec_mode: 'cluster', - instances: 2, - watch: false, - - max_memory_restart: '230M', - env: { - DEBUG_COLORS: true, - NODE_ENV: 'development', - }, - - args: '--allowed_origins=dev.* --cluster --color', - }, - ], -} diff --git a/src/migration/helper/encrypt-configs.ts b/src/migration/helper/encrypt-configs.ts index b541351b..77b14311 100644 --- a/src/migration/helper/encrypt-configs.ts +++ b/src/migration/helper/encrypt-configs.ts @@ -2,6 +2,7 @@ import { plainToInstance } from 'class-transformer' import 'reflect-metadata' +import { ENCRYPT } from '~/app.config' import { register } from '~/global/index.global' import { generateDefaultConfig } from '~/modules/configs/configs.default' import * as optionDtos from '~/modules/configs/configs.dto' @@ -9,6 +10,8 @@ import { encryptObject } from '~/modules/configs/configs.encrypt.util' import { IConfig, IConfigKeys } from '~/modules/configs/configs.interface' import { getDatabaseConnection } from '~/utils/database.util' +console.log(ENCRYPT) + const allOptionKeys: Set = new Set() Object.entries(optionDtos).reduce((obj, [key, value]) => { const optionKey = (key.charAt(0).toLowerCase() +