mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-08 12:36:10 +08:00
修改 task 命令超时时间判断
This commit is contained in:
parent
1f8f35476a
commit
df1addc1ff
|
@ -34,7 +34,7 @@ define_program() {
|
||||||
handle_log_path() {
|
handle_log_path() {
|
||||||
local file_param=$1
|
local file_param=$1
|
||||||
|
|
||||||
if [[ -z $file_param ]];then
|
if [[ -z $file_param ]]; then
|
||||||
file_param="task"
|
file_param="task"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -76,8 +76,10 @@ format_params() {
|
||||||
mtime_format="%Y-%m-%d %H:%M:%S.%3N"
|
mtime_format="%Y-%m-%d %H:%M:%S.%3N"
|
||||||
fi
|
fi
|
||||||
timeoutCmd=""
|
timeoutCmd=""
|
||||||
if type timeout &>/dev/null; then
|
if [[ $command_timeout_time ]]; then
|
||||||
timeoutCmd="timeout --foreground -s 2 -k 10s $command_timeout_time "
|
if type timeout &>/dev/null; then
|
||||||
|
timeoutCmd="timeout --foreground -s 2 -k 10s $command_timeout_time "
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
|
# params=$(echo "$@" | sed -E 's/([^ ])&([^ ])/\1\\\&\2/g')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user