common_server_restart.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:skp_edu_docker 作者: TensorMSA 项目源码 文件源码
def post(self, request):
        """
        Request to restart all nginx threads
        ---
        # Class Name : CommonServerRestart

        # Description:
            restart nginx threads via rest api
        """
        try:
            os.kill(os.getppid(), signal.SIGHUP)
            return_data = {"status": "200", "result": "restart uwsgi"}
            return Response(json.dumps(return_data))
        except Exception as e:
            return_data = {"status": "404", "result": str(e)}
            return Response(json.dumps(return_data))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号