修改 task 命令超时时间判断

This commit is contained in:
whyour 2023-05-01 11:05:36 +08:00
parent 1f8f35476a
commit df1addc1ff

View File

@ -76,9 +76,11 @@ format_params() {
mtime_format="%Y-%m-%d %H:%M:%S.%3N"
fi
timeoutCmd=""
if [[ $command_timeout_time ]]; then
if type timeout &>/dev/null; then
timeoutCmd="timeout --foreground -s 2 -k 10s $command_timeout_time "
fi
fi
# params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
}