server.py 文件源码

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

项目:suarm 作者: vicobits 项目源码 文件源码
def supervisor():
        """
        1. Create new supervisor config file.
        2. Copy local config to remote config.
        3. Register new command.
        """
        with settings(hide('warnings'), warn_only=True):
            if exists('/etc/supervisor/conf.d/%s.conf' % env.domain):
                sudo('rm /etc/supervisor/conf.d/%s.conf' % env.domain)

            with cd('/etc/supervisor/conf.d'):
                upload_template(
                    filename=src(req.parse("suarm"), "suarm/tmpl/django_supervisor.conf"),
                    destination='%s.conf' % env.domain,
                    context={
                        "project_name": env.project,
                        "project_path": get_project_src(env.stage),
                        "app_user": make_user(env.project),
                    },
                    use_sudo=True,
                )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号