From ea9a407707140493d99bba07ed37a30c1e4f9b21 Mon Sep 17 00:00:00 2001
From: cwy-p8d-u1 <sven-ove.haensel@stud.hs-hannover.de>
Date: Fri, 15 Mar 2024 14:58:06 +0100
Subject: [PATCH] add keepalive and fix missing edges for unnammed pipe obj

---
 .../streaming/clients/sub/postgres/sub_pg_cdm.py            | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/code/infrastructure/streaming/clients/sub/postgres/sub_pg_cdm.py b/code/infrastructure/streaming/clients/sub/postgres/sub_pg_cdm.py
index 37f7fed..a7b6615 100755
--- a/code/infrastructure/streaming/clients/sub/postgres/sub_pg_cdm.py
+++ b/code/infrastructure/streaming/clients/sub/postgres/sub_pg_cdm.py
@@ -160,11 +160,11 @@ def parse_json_to_sql_query(json,node_type):
         add_edge(key, keys, rel, dest, edge_type,json)  
 
         rel = 'affects'
-        key = f"{key_header}_sourceUUID"
+        key = f"{key_header}_sourceUUID{key_postfix}"
         add_edge(key, keys, rel, dest, edge_type,json)  
 
         rel = 'affects2'
-        key = f"{key_header}_sinkUUID"
+        key = f"{key_header}_sinkUUID{key_postfix}"
         add_edge(key, keys, rel, dest, edge_type,json)  
 
     edge_values = [source,dest,edge_type]
@@ -261,7 +261,7 @@ client.on_connect = on_connect
 client.on_message = on_message
 client.failed_connect = False
 
-client.connect(broker_hostname,broker_port,60)
+client.connect(broker_hostname,broker_port,keepalive=3600*4)
 client.loop_start()
 
 # this try-finally block ensures that whenever we terminate the program earlier by hitting ctrl+c, it still gracefully exits   
-- 
GitLab