|
|
@ -216,6 +216,8 @@ function run_context {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function acquire_lock {
|
|
|
|
function acquire_lock {
|
|
|
|
|
|
|
|
local _retry=120
|
|
|
|
|
|
|
|
|
|
|
|
# acquire for execution lock
|
|
|
|
# acquire for execution lock
|
|
|
|
log debug "Acquiring lock ${LOCK_FILE}"
|
|
|
|
log debug "Acquiring lock ${LOCK_FILE}"
|
|
|
|
while true; do
|
|
|
|
while true; do
|
|
|
@ -225,6 +227,12 @@ function acquire_lock {
|
|
|
|
break
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_retry=$((_retry - 1))
|
|
|
|
|
|
|
|
if [ ${_retry} -le 0 ]; then
|
|
|
|
|
|
|
|
log err "Error: Could not acquire lock ${LOCK_FILE}" 2
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
sleep 1
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|