Skip to content

Commit

Permalink
修复 smtp python 参数说明
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Aug 18, 2024
1 parent af5de83 commit 230a8f6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 8 additions & 0 deletions sample/config.sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,16 @@ export CHRONOCAT_QQ=""
export CHRONOCAT_TOKEN=""

## 16. SMTP
## JavaScript 参数
## 邮箱服务名称,比如126、163、Gmail、QQ等,支持列表 https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json
export SMTP_SERVICE=""

## Python 参数
## SMTP 发送邮件服务器,形如 smtp.exmail.qq.com:465
export SMTP_SERVER=""
## SMTP 发送邮件服务器是否使用 SSL,填写 true 或 false
export SMTP_SSL=""

## smtp_email 填写 SMTP 收发件邮箱,通知将会由自己发给自己
export SMTP_EMAIL=""
## smtp_password 填写 SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定
Expand Down
13 changes: 10 additions & 3 deletions shell/otask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ run_normal() {
if [[ $isJsOrPythonFile == 'false' ]]; then
clear_non_sh_env
fi
$timeoutCmd $which_program $file_param "${script_params[@]:-''}"
$timeoutCmd $which_program $file_param "${script_params[@]}"
}

handle_env_split() {
Expand Down Expand Up @@ -143,7 +143,7 @@ run_concurrent() {
export "${env_param}=${array[$i - 1]}"
clear_non_sh_env
fi
eval envParam="${env_param}" numParam="${i}" $timeoutCmd $which_program $file_param "${script_params[@]:-''}" &>$single_log_path &
eval envParam="${env_param}" numParam="${i}" $timeoutCmd $which_program $file_param "${script_params[@]}" &>$single_log_path &
done

wait
Expand Down Expand Up @@ -188,7 +188,7 @@ run_designated() {
file_param=${file_param/$relative_path\//}
fi

envParam="${env_param}" numParam="${num_param}" $timeoutCmd $which_program $file_param "${script_params[@]:-''}"
envParam="${env_param}" numParam="${num_param}" $timeoutCmd $which_program $file_param "${script_params[@]}"
}

## 运行其他命令
Expand Down Expand Up @@ -269,7 +269,14 @@ check_file "${task_shell_params[@]}"
if [[ $isJsOrPythonFile == 'false' ]]; then
run_task_before "${task_shell_params[@]}"
fi
if set -o | grep -q 'nounset.*on'; then
set_u_on="true"
set +u
fi
main "${task_shell_params[@]}"
if [[ "$set_u_on" == 'true' ]]; then
set -u
fi
if [[ $isJsOrPythonFile == 'true' ]]; then
export NODE_OPTIONS="${PREV_NODE_OPTIONS}"
export PYTHONPATH="${PREV_PYTHONPATH}"
Expand Down

0 comments on commit 230a8f6

Please sign in to comment.