base.py 文件源码

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

项目:antgo 作者: jianzfb 项目源码 文件源码
def flash(self):
    if self.pid != str(os.getpid()):
      # reset process pid
      self.pid = str(os.getpid())

      # update zmq sockets
      # (couldnt share socket in differenet process)
      self.zmq_socket = zmq.Context().socket(zmq.REQ)
      self.zmq_file_socket = zmq.Context().socket(zmq.DEALER)

      # update context
      ctx = main_context(self.main_file, self.main_folder)
      if self.main_param is not None:
        main_config_path = os.path.join(self.main_folder, self.main_param)
        params = yaml.load(open(main_config_path, 'r'))
        ctx.params = params

      self.context = ctx
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号