From 65e733138ad35fcf11f8eddee5864a91df0e56a6 Mon Sep 17 00:00:00 2001 From: zeus Date: Sat, 27 Nov 2021 20:51:10 +0200 Subject: [PATCH] man poc --- .../modules/ROOT/pages/doc-readmongo_service.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/poc-datacollector/modules/ROOT/pages/doc-readmongo_service.adoc b/poc-datacollector/modules/ROOT/pages/doc-readmongo_service.adoc index a1625b2..c51111d 100644 --- a/poc-datacollector/modules/ROOT/pages/doc-readmongo_service.adoc +++ b/poc-datacollector/modules/ROOT/pages/doc-readmongo_service.adoc @@ -66,7 +66,9 @@ const pubClient = new Redis({ port: REDIS_PORT, }); -// read from redis + // ------------------------------ + // read from redis + // ------------------------------ async function getkey(id) { return new Promise((resolve) => { pubClient.get(id, function (err, reply) { @@ -85,7 +87,9 @@ async function getkey(id) { }); } -// check if stream exists + // ------------------------------ + // check if stream exists + // ------------------------------ async function checkstream(data) { var res = await getkey(data.id); if (res == "1") { @@ -106,6 +110,9 @@ async function checkstream(data) { } } + // ------------------------------ + // --- open socket ------------- + // ------------------------------ io.on("connection", (s) => { console.error("socket connection"); var usersession = new Object(); @@ -134,7 +141,7 @@ io.on("connection", (s) => { }); // ------------------------------ - // --- event + // --- event ---------------- // ------------------------------ s.on("onevent", function (data) { var binddata = {