Jenkins部署测试平台框架

执行脚本的备份:

workon flaskscrapy
PIDS_MAIN=`ps -ef|grep AutotestFramework/test_run/main.py|grep -v grep|cut -c 9-15`
if [ "$PIDS_MAIN" != "" ]; then
ps -ef|grep AutotestFramework/test_run/main.py|grep -v grep|cut -c 9-15|xargs kill -9
fi
BUILD_ID=dontKillMe
nohup python /home/code/AutotestFramework/test_run/main.py > /dev/null 2>&1 &

PIDS_RUN=`ps -ef|grep AutotestFramework/test_run/run.py|grep -v grep|cut -c 9-15`
if [ "$PIDS_RUN" != "" ]; then
ps -ef|grep AutotestFramework/test_run/run.py|grep -v grep|cut -c 9-15|xargs kill -9
fi
BUILD_ID=dontKillMe
nohup python  /home/code/AutotestFramework/test_run/run.py > /dev/null 2>&1 &

之前没有使用celery
使用celery部署

workon flaskscrapy
cd /home/code
celery multi start -A AutotestFramework.main worker -l info -P threads

posted @ 2021-08-11 15:22  技术改变命运Andy  阅读(133)  评论(0编辑  收藏  举报