Commit 2d2941aa by 柴鹏飞

接口启动采用A/B版本

parent 0157477e
...@@ -8,5 +8,5 @@ for port in `echo '7001,7002' | tr ',' ' '` ...@@ -8,5 +8,5 @@ for port in `echo '7001,7002' | tr ',' ' '`
do do
echo $port echo $port
nohup python ../src/service/recommend_service.py --port=$port > ../log/console_service_$port.log 2>&1 & nohup python ../src/service/recommend_service.py --port=$port > ../log/console_service_$port.log 2>&1 &
echo $! >> .start_service.pid echo $! >> start_service_version_a.pid
done done
\ No newline at end of file
#!/bin/bash
set -u
set -x
for port in `echo '7501,7502' | tr ',' ' '`
do
echo $port
nohup python ../src/service/recommend_service.py --port=$port > ../log/console_service_$port.log 2>&1 &
echo $! >> start_service_version_b.pid
done
\ No newline at end of file
#!/bin/bash #!/bin/bash
pid_file=.start_service.pid pid_file=start_service_version_a.pid
# 结束接口服务 # 结束接口服务
cat $pid_file | xargs kill cat $pid_file | xargs kill
......
#!/bin/bash
pid_file=start_service_version_b.pid
# 结束接口服务
cat $pid_file | xargs kill
# 删除 pid 文件
rm $pid_file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment