查看“Php-worker重启脚本”的源代码
←
Php-worker重启脚本
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=mq_res= <pre> #score-addScore-high 队列大于 500 重启phpwork [root@mq01 sh]# cat mq_res.sh #!/bin/bash #Author: linuxsa.org docker ps | grep rabbitmqCluster01 #if [ $? -eq 0 ] if [ $? -ne 0 ] then echo "No rabbitmq was found ,exit now" exit 1 fi qu=` docker exec -i rabbitmqCluster01 rabbitmqadmin --username=admin --password=886 list queues | grep score-addScore-high |awk '{print $4}'` #if [ $qu -eq 0 ] if [ $qu -gt 50 ] #if [ $qu -gt 500 ] #if $qu gt 500 then echo " qu is 500,and then restart the score-high" echo "*****" function restartmq { salt 'prod-sns-es' cmd.run 'docker ps | grep php-worker' if [ $? -ne 0 ] then echo "No phpworker was found ,exit now" exit 1 fi salt 'prod-sns-es' cmd.run 'docker exec -i docker-for-services_php-worker_1 supervisorctl restart production1.rabbitmq.recovery.addScoreHigh:production1.rabbitmq.recovery.addScoreHigh_00' salt 'prod-sns-es' cmd.run 'docker exec -i docker-for-services_php-worker_1 supervisorctl restart production1.rabbitmq.recovery.addScoreHigh:production1.rabbitmq.recovery.addScoreHigh_01' salt 'prod-sns-es' cmd.run 'docker exec -i docker-for-services_php-worker_1 supervisorctl restart production1.rabbitmq.recovery.addScoreHigh:production1.rabbitmq.recovery.addScoreHigh_02' salt 'prod-sns-es' cmd.run 'docker exec -i docker-for-services_php-worker_1 supervisorctl restart production1.rabbitmq.recovery.addScoreHigh:production1.rabbitmq.recovery.addScoreHigh_03' echo "mq has restart " } restartmq; fi </pre>
返回至
Php-worker重启脚本
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息