From cad1a77f8f4425ce5d4560902d5d39886982cfa0 Mon Sep 17 00:00:00 2001 From: youngS Date: Fri, 2 Jul 2021 16:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/flyapp.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 fir_ser/flyapp.sh diff --git a/fir_ser/flyapp.sh b/fir_ser/flyapp.sh new file mode 100644 index 0000000..3d8f01f --- /dev/null +++ b/fir_ser/flyapp.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# + +source /www/flyapps/py3/bin/activate && cd /www/flyapps/fir_ser/ +chown www.www -R /www/flyapps/fir_ser/ +stop(){ +pgrep -f uwsgi |xargs -i kill {} +sleep 1 +pgrep -f celery |xargs -i kill {} +} +start(){ +uwsgi --ini uwsgi.conf +sleep 1 +celery multi start 4 -A fir_ser -l INFO -c4 --pidfile=/var/run/celery/%n.pid --logfile=logs/%p.log +sleep 1 +nohup celery -A fir_ser beat --uid=1000 --pidfile=logs/beat.pid --scheduler django -l INFO --logfile=logs/beat.log & + +} + +restart(){ +stop +sleep 1 +start +} +$@