Protect rabbit transport definition
As it turns out, a plugin can be loaded several time during a CI run. When it does so, the trick used to save the rabbit get_transport_url method definition erases the previous version. This protects it by only defining it once. Change-Id: I7eb5a1934b4be87b289df8c78927852fc84aac18
This commit is contained in:
parent
e8dfd2a928
commit
cc7f3daace
|
@ -421,9 +421,11 @@ if is_service_enabled amqp1; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Save rabbit get_transport_url for notifications if necessary
|
# Save rabbit get_transport_url for notifications if necessary
|
||||||
get_transport_url_definition=$(declare -f get_transport_url)
|
if [ ! $(type -t _get_rabbit_transport_url) ]; then
|
||||||
eval "_get_rabbit_transport_url() ${get_transport_url_definition#*\()}"
|
get_transport_url_definition=$(declare -f get_transport_url)
|
||||||
export -f _get_rabbit_transport_url
|
eval "_get_rabbit_transport_url() ${get_transport_url_definition#*\()}"
|
||||||
|
export -f _get_rabbit_transport_url
|
||||||
|
fi
|
||||||
|
|
||||||
# Note: this is the only tricky part about out of tree rpc plugins,
|
# Note: this is the only tricky part about out of tree rpc plugins,
|
||||||
# you must overwrite the iniset_rpc_backend function so that when
|
# you must overwrite the iniset_rpc_backend function so that when
|
||||||
|
|
Loading…
Reference in New Issue