update index.js

main
MohammadHoseinPaymard 2 weeks ago
parent f55516a954
commit 874eb1939c
  1. 5
      index.js

@ -48,8 +48,8 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js"));
allWorkFlowInfo[workflow.id] = { allWorkFlowInfo[workflow.id] = {
isValid: invalidPathsWithoutEnding.length == 0 ? true : false, isValid: invalidPathsWithoutEnding.length == 0 ? true : false,
root: { root: {
validPaths: invalidPathsWithoutEnding.length == 0 && tree.length > 0 ? tree : [], validPaths: invalidPathsWithoutEnding.length == 0 && tree.length > 0 ? tree : "",
// invalidPaths: invalidPathsWithoutEnding.length == 0?[]:invalidPathsWithoutEnding, invalidPaths: invalidPathsWithoutEnding,
valid: tree.length, valid: tree.length,
invalid: invalidPathsWithoutEnding.length, invalid: invalidPathsWithoutEnding.length,
subFlowList: subFlowParentIds subFlowList: subFlowParentIds
@ -112,6 +112,7 @@ require(path.join(process.cwd(), "..", "server", "dist", "database.js"));
for await(let key of Object.keys(allWorkFlowInfo)){ for await(let key of Object.keys(allWorkFlowInfo)){
if (!allWorkFlowInfo[key].isValid) { if (!allWorkFlowInfo[key].isValid) {
console.log(`workflow with id:'${key}' in invalid`);
delete allWorkFlowInfo[key]; delete allWorkFlowInfo[key];
} }
} }

Loading…
Cancel
Save