runtime.py 文件源码

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

项目:rill 作者: PermaData 项目源码 文件源码
def start(self, graph_id, done_callback):
        """
        Execute a graph.
        """
        self.logger.debug('Graph {}: Starting execution'.format(graph_id))

        graph = self.get_graph(graph_id)

        network = Network(graph)
        executor = gevent.Greenlet(network.go)
        # FIXME: should we delete the executor from self._executors on finish?
        # this has an impact on the result returned from get_status().  Leaving
        # it means that after completion it will be started:True, running:False
        # until stop() is triggered, at which point it will be started:False,
        # running:False
        executor.link(lambda g: done_callback())
        self._executors[graph_id] = (executor, network)
        executor.start()
        # if executor.is_running():
        #     raise ValueError('Graph {} is already started'.format(graph_id))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号