41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
From: rabbitali <shusheng.wen@outlook.com>
|
|
Date: Mon, 8 May 2023 10:34:39 +0800
|
|
Subject: [PATCH] add gevent conf item when create uwsgi conf file
|
|
|
|
---
|
|
aops-vulcanus | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/aops-vulcanus b/aops-vulcanus
|
|
index 368c57f..d7e4cb9 100644
|
|
--- a/aops-vulcanus
|
|
+++ b/aops-vulcanus
|
|
@@ -42,6 +42,7 @@ function create_config_file() {
|
|
harakiri=$(get_config "${config_file}" "uwsgi" "harakiri")
|
|
processes=$(get_config "${config_file}" "uwsgi" "processes")
|
|
threads=$(get_config "${config_file}" "uwsgi" "threads")
|
|
+ gevent=$(get_config "${config_file}" "uwsgi" "gevent")
|
|
|
|
check_file $daemonize
|
|
echo "[INFO] run ${service_name} under path: ${wsgi_file}"
|
|
@@ -65,10 +66,16 @@ pidfile=${OUT_PATH}/${service_name}.pid
|
|
callable=app
|
|
http-timeout=${http_timeout}
|
|
harakiri=${harakiri}
|
|
-threads=${threads}
|
|
processes=${processes}
|
|
lazy-apps=true
|
|
daemonize=${daemonize}" >"${OUT_PATH}"/"${service_name}".ini
|
|
+ if [ ${gevent} ]
|
|
+ then
|
|
+ echo "gevent=${gevent}
|
|
+gevent-monkey-patch=true" >>"${OUT_PATH}"/"${service_name}".ini
|
|
+ else
|
|
+ echo "threads=${threads}" >>"${OUT_PATH}"/"${service_name}".ini
|
|
+ fi
|
|
chown root: ${OUT_PATH}/"${service_name}".ini
|
|
chmod 750 ${OUT_PATH}/"${service_name}".ini
|
|
echo "[INFO] create ${service_name} uwsgi file ok,path is ${OUT_PATH}/${service_name}.ini"
|
|
--
|
|
|