MT#4999 Avoid re-execution of ngcp-check_active

Running ngcp-check_active for each single script causes quite
some overhead, it should be enough to just check for result of
ngcp-check_active *once* and then re-use the result.
vseva/5635
Michael Prokop 13 years ago
parent 91b73e9019
commit 8b8b04c428

@ -83,6 +83,12 @@ running_on_active_node() {
fi
}
if running_on_active_node ; then
ACTIVE_NODE=true
else
ACTIVE_NODE=false
fi
apply_revision() {
[ -n "$1" ] || return 1
@ -174,7 +180,7 @@ revision_wrapper() {
revlist="$revlist $(basename $rev)"
;;
*)
if running_on_active_node ; then
if $ACTIVE_NODE ; then
echo "Replication script ${revname} noted, nothing to do on active node"
else
revlist="$revlist $(basename $rev)"

Loading…
Cancel
Save