feat: admin set env

This commit is contained in:
archer
2023-06-10 22:56:57 +08:00
parent 7dd8e7bea1
commit b8a75921ed
18 changed files with 243 additions and 58 deletions

View File

@@ -16,9 +16,7 @@ const reduceQueue = () => {
};
export async function generateQA(): Promise<any> {
const maxProcess = Number(process.env.QA_MAX_PROCESS || 10);
if (global.qaQueueLen >= maxProcess) return;
if (global.qaQueueLen >= global.systemEnv.qaMaxProcess) return;
global.qaQueueLen++;
let trainingId = '';