From bee92011b19475e5e0fde67551d813ba4a166653 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Fri, 5 Apr 2019 15:07:02 +0000 Subject: [PATCH] SW-516: fixed OTDB_Services tests for python3 and messagebus changes. Also made the test test against a local testing postgres database. All contained in python, no hybrid .run/.py tests anymore. --- SAS/OTDB_Services/TreeStatusEvents.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SAS/OTDB_Services/TreeStatusEvents.py b/SAS/OTDB_Services/TreeStatusEvents.py index bc9ad998944..870e60be15c 100755 --- a/SAS/OTDB_Services/TreeStatusEvents.py +++ b/SAS/OTDB_Services/TreeStatusEvents.py @@ -95,10 +95,13 @@ def main(): # Set signalhandler to stop the program in a neat way. signal.signal(signal.SIGINT, signal_handler) + create_service(options.busname, dbcreds) + +def create_service(busname, dbcreds): alive = True connected = False otdb_connection = None - with ToBus(options.busname) as send_bus: + with ToBus(busname) as send_bus: while alive: while alive and not connected: # Connect to the database -- GitLab