From b24b6f700fb5ca6f430daed240fbd5540baf4b3e Mon Sep 17 00:00:00 2001 From: MohammadHoseinPaymard Date: Tue, 27 May 2025 09:12:43 +0330 Subject: [PATCH] update index.js --- index.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index a09158e..d37d24f 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,6 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); (async function () { await sleep(5e3); console.time("WorkflowTester") - console.log("initilizing begin.."); const workflows = await getAllWorkflows({ @@ -105,12 +104,17 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); } + + //---------------------------------------------------------------------------------------- + // console.log("allWorkFlowInfo", JSON.stringify(allWorkFlowInfo, null, 2)); // fs.writeFileSync("./result-pretty.json", JSON.stringify(allWorkFlowInfo, null, 2)); // await saveLargeObject(allWorkFlowInfo, "./result-pretty-beforeProcess.json") // fs.writeFileSync("./result-beforeProcess.json", JSON.stringify(allWorkFlowInfo)); //invalid haro ham dar yek araye zakhire kon + + //---------------------------------------------------------------------------------------- for await(let key of Object.keys(allWorkFlowInfo)){ if (!allWorkFlowInfo[key].isValid) { @@ -126,9 +130,12 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js")); for await(const workflow of Object.keys(allWorkFlowInfo)){ if(workflow==57){ const data = allWorkFlowInfo[workflow]; - const paths = data?.root?.validPaths || []; - if(paths?.length==0) allWorkFlowInfo[key].isValid = false; - console.log(paths); + const pathsCollection = data?.root?.validPaths || []; + if(pathsCollection?.length==0) allWorkFlowInfo[key].isValid = false; + for await(let pathString of pathsCollection){ + const path = pathString.split(","); + console.log("path",path); + } return; } }