mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(apps/service-manager): Add logging output for service uptime checks (#23252)
This commit is contained in:
@@ -143,6 +143,7 @@ function comp_compile() {
|
|||||||
mkdir -p "$AC_BINPATH_FULL"
|
mkdir -p "$AC_BINPATH_FULL"
|
||||||
echo "Creating $confDir..."
|
echo "Creating $confDir..."
|
||||||
mkdir -p "$confDir"
|
mkdir -p "$confDir"
|
||||||
|
mkdir -p "$confDir/modules"
|
||||||
|
|
||||||
echo "Cmake install..."
|
echo "Cmake install..."
|
||||||
$SUDO cmake --install . --config $CTYPE
|
$SUDO cmake --install . --config $CTYPE
|
||||||
@@ -166,6 +167,7 @@ function comp_compile() {
|
|||||||
cp -v --no-clobber "$confDir/authserver.conf.dist" "$confDir/authserver.conf"
|
cp -v --no-clobber "$confDir/authserver.conf.dist" "$confDir/authserver.conf"
|
||||||
[[ -f "$confDir/dbimport.conf.dist" ]] && \
|
[[ -f "$confDir/dbimport.conf.dist" ]] && \
|
||||||
cp -v --no-clobber "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf"
|
cp -v --no-clobber "$confDir/dbimport.conf.dist" "$confDir/dbimport.conf"
|
||||||
|
|
||||||
for f in "$confDir/modules/"*.dist
|
for f in "$confDir/modules/"*.dist
|
||||||
do
|
do
|
||||||
[[ -e $f ]] || break # handle the case of no *.dist files
|
[[ -e $f ]] || break # handle the case of no *.dist files
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ function serialize_exec_definition() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
local args_json
|
local args_json
|
||||||
args_json=$(printf '%s\0' "${rel_args[@]}" "__AC_SENTINEL__" | jq -R -s 'split("\u0000")[:-1]')
|
args_json=$(printf '%s\0' "${rel_args[@]}" | jq -R -s 'split("\u0000")[:-1]')
|
||||||
|
|
||||||
jq -n --arg command "$rel_command" --argjson args "$args_json" '{command: $command, args: $args}'
|
jq -n --arg command "$rel_command" --argjson args "$args_json" '{command: $command, args: $args}'
|
||||||
}
|
}
|
||||||
@@ -2291,6 +2291,9 @@ function wait_service_uptime() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
waited=$((waited + 1))
|
waited=$((waited + 1))
|
||||||
done
|
done
|
||||||
|
# show service logs for debugging
|
||||||
|
echo -e "${YELLOW}Service logs for '$service_name':${NC}"
|
||||||
|
service_logs "$service_name" true
|
||||||
echo -e "${RED}Timeout: $service_name did not reach ${min_seconds}s uptime within ${timeout}s${NC}" >&2
|
echo -e "${RED}Timeout: $service_name did not reach ${min_seconds}s uptime within ${timeout}s${NC}" >&2
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user