def stopScheduler():
try:
subprocess.check_call(["sudo", "service", "supervisor", "stop"])
except subprocess.CalledProcessError as e:
print "ERROR: couldn't stop the scheduler (supervisor): {reason}".format(reason=e)
exit(-1)
try:
subprocess.check_call(["sudo", "service", "rabbitmq-server", "stop"])
except subprocess.CalledProcessError as e:
print "ERROR: couldn't stop the scheduler (rabbitmq): {reason}".format(reason=e)
exit(-1)
print "Scheduler stopped successfully!"
评论列表
文章目录