Script execution
This commit is contained in:
@@ -115,7 +115,7 @@ statistics =None
|
||||
current_pipeline = None
|
||||
|
||||
def start_pipeline(name, parameters, port=DEFAULT_PIPELINE_PORT):
|
||||
global stop_event, parameter_queue, statistics. current_pipeline, parameter_queue, statistics
|
||||
global stop_event, parameter_queue, statistics, current_pipeline, parameter_queue, statistics
|
||||
if name is None:
|
||||
raise Exception("Pipeline name undefined")
|
||||
stop_pipeline();
|
||||
@@ -146,7 +146,14 @@ def stop_pipeline():
|
||||
parameter_queue = None
|
||||
statistics =None
|
||||
|
||||
|
||||
|
||||
def get_pipeline():
|
||||
return current_pipeline
|
||||
return current_pipeline
|
||||
|
||||
def get_pipeline_msg():
|
||||
if not get_pipeline():
|
||||
raise Exception("Pipeline not started")
|
||||
with source(host="127.0.0.1", port=pipeline_port, mode=SUB, receive_timeout = 3000) as stream:
|
||||
data = stream.receive()
|
||||
if not data:
|
||||
raise Exception("Received None message.")
|
||||
return data.data
|
||||
Reference in New Issue
Block a user