提交 8e67f35b 编写于 作者: Y Yiru Wang Mac

http-timeout and harakiri become configurable

上级 57ae8887
......@@ -62,8 +62,12 @@ log_level=INFO
log_name=log_info.log
[UWSGI]
; uwsgi log file path
daemonize=/var/log/uwsgi.log
; The data size transferred from back to forth
buffer-size=65536
; HTTP Connection time
http-timeout=600
; Server response time
harakiri=600
......@@ -18,13 +18,16 @@ function create_config_file(){
echo "[INFO] config type is: $service"
daemonize=$(get_config "$service" "daemonize")
buffer_size=$(get_config "$service" "buffer-size")
http_timeout=$(get_config "$service" "http-timeout")
harakiri=$(get_config "$service" "harakiri")
wsgi_file_path=$(find /usr/lib/ -name "packageship")
if [ $service = "manage" -o $service = "all" ];then
write_port=$(get_config "$service" "write_port")
write_ip_addr=$(get_config "$service" "write_ip_addr")
if [[ -z "$daemonize" ]] || [[ -z "$buffer_size" ]] || [[ -z "$write_ip_addr" ]] || [[ -z "$write_port" ]];then
if [[ -z "$daemonize" ]] || [[ -z "$buffer_size" ]] || [[ -z "$write_ip_addr" ]] || [[ -z "$http_timeout" ]] || [[ -z "$harakiri" ]] || [[ -z "$write_port" ]];
then
echo "[ERROR] CAN NOT find all config name in: $SYS_PATH/package.ini, Please check the file"
echo "[ERROR] The following config name is needed: daemonize, buffer_size, write_port and write_ip_addr"
echo "[ERROR] The following config name is needed: daemonize, buffer-size, write_port, write_ip_addr, harakiri and http-timeout"
exit 1
fi
if [ -z "$wsgi_file_path" ];then
......@@ -39,8 +42,8 @@ wsgi-file=$wsgi_file_path/manage.py
callable=app
buffer-size=$buffer_size
pidfile=$OUT_PATH/manage.pid
http-timeout=600
harakiri=600
http-timeout=$http_timeout
harakiri=$harakiri
daemonize=$daemonize" > $OUT_PATH/manage.ini
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册