pipelines_manager.py 文件源码

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

项目:pypers 作者: frankosan 项目源码 文件源码
def pause_pipeline(self, run_id, user):
        """
        Interrupt pipeline by sending signal to corresponding worker's children
        """
        pid = self.pids.get(run_id)
        if pid:
            pretty_print("Pausing pipeline: id=%d, user=%s" % (run_id, user))
            try:
                parent = psutil.Process(pid)
                children = parent.children(recursive=True)
                for child in children:
                    run_as(cmd=['kill', child.pid], user=user)
            except psutil.NoSuchProcess:
                pretty_print("Error pausing pipeline: no process with ID %d" % int(pid))
        else:
            pretty_print("Error pausing pipeline: ID %d not found" % run_id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号