Commit 040d6b72 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[helpers] Create remotely synced output if socket is given

parent b5fc0451
......@@ -58,6 +58,7 @@ from .inputs import InputGroup
from .outputs import SynchronizationListener
from .outputs import OutputList
from .outputs import Output
from .outputs import RemotelySyncedOutput
from .algorithm import Algorithm
logger = logging.getLogger(__name__)
......@@ -379,7 +380,13 @@ def create_inputs_from_configuration(
def create_outputs_from_configuration(
config, algorithm, prefix, cache_root, input_list=None, data_loaders=None
config,
algorithm,
prefix,
cache_root,
input_list=None,
data_loaders=None,
loop_socket=None,
):
data_sinks = []
......@@ -474,6 +481,17 @@ def create_outputs_from_configuration(
if not status:
raise IOError("Cannot create cache sink '%s'" % details["path"])
if loop_socket is not None:
output_list.add(
RemotelySyncedOutput(
name,
data_sink,
loop_socket,
synchronization_listener=synchronization_listener,
force_start_index=start_index,
)
)
else:
output_list.add(
Output(
name,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment