Skip to content

Commit d892f82

Browse files
davidrohrchiarazampolli
authored andcommitted
Use IPC for local calib connections
1 parent f93dbde commit d892f82

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

DATA/common/setenv_calib.sh

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ echo CALIBDATASPEC_BARREL = $CALIBDATASPEC_BARREL 1>&2
106106
echo CALIBDATASPEC_CALO = $CALIBDATASPEC_CALO 1>&2
107107

108108
# proxies properties
109-
PORT_BARREL=30453
110-
PORT_CALO=30454
111109
get_proxy_connection()
112110
{
113111
if (( $# < 2 )); then
@@ -117,16 +115,6 @@ get_proxy_connection()
117115
echo "second parameter is the type of connection (input/output)"
118116
exit 1
119117
fi
120-
121-
# setting the port
122-
if [[ $1 == "barrel" ]]; then
123-
local PORT=$PORT_BARREL
124-
elif [[ $1 == "calo" ]]; then
125-
local PORT=$PORT_CALO
126-
else
127-
echo "parameter 1 should be either 'barrel' or 'calo'"
128-
exit 3
129-
fi
130118

131119
# setting the type of connection
132120
if [[ $2 == "input" ]]; then
@@ -137,8 +125,13 @@ get_proxy_connection()
137125
echo "parameter 2 should be either 'input' or 'output'"
138126
exit 2
139127
fi
140-
141-
local PROXY_CONN="--proxy-channel-name aggregator-proxy-$1 --channel-config \"name=aggregator-proxy-$1,$CONNECTION,rateLogging=1,transport=zeromq,address=tcp://localhost:$PORT\""
128+
129+
if workflow_has_parameter CALIB_LOCAL_AGGREGATOR; then
130+
CONNECTION+=",transport=shmem,address=ipc://${UDS_PREFIX}aggregator-shm-$1"
131+
else
132+
CONNECTION+=",transport=zeromq"
133+
fi
134+
local PROXY_CONN="--proxy-channel-name aggregator-proxy-$1 --channel-config \"name=aggregator-proxy-$1,$CONNECTION,rateLogging=1\""
142135

143136
echo PROXY_CONN = $PROXY_CONN 1>&2
144137
echo $PROXY_CONN

0 commit comments

Comments
 (0)