From ef3d60f0c22cc1e827a7217c29f50b589242af16 Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 23 Nov 2020 23:21:53 +0200 Subject: [PATCH] global --- swarmlab-app/src/run/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 7048c11..96e977f 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -318,7 +318,8 @@ cors(corsOptions), (req, res, next) => { console.log(reslog); var pathfileval = pathmodule.basename(reslog.log.tailed_path); var indexfind = global.pipelines.findIndex(x => x.pathlogfile==pathfileval); - indexfind === 1 ? sendlog(reslog,pathfileval) : console.log("object already exists") + //indexfind === -1 ? sendlog(reslog,pathfileval) : console.log("object already exists") + indexfind === -1 ? console.log("object not found") : sendlog(reslog,pathfileval) console.log("IOT "+JSON.stringify(reslog.log.tailed_path)); console.log("IOTindexfind "+JSON.stringify(indexfind)); console.log("IOTuser "+JSON.stringify(global.pipelines));