fake_hsm_coordinator.py 文件源码

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

项目:intel-manager-for-lustre 作者: intel-hpdd 项目源码 文件源码
def run(self):
        if not self.coordinator.enabled:
            return

        log.debug("Coordinator thread for %s starting: %s" %
                  (self.coordinator.filesystem, threading.current_thread()))

        while not self._stopping.is_set():
            # Keep agents busy
            self.generate_actions_for_agents()

            # Stack up waiting actions
            if bool(random.getrandbits(1)):
                self.unassigned_requests.put(self.get_random_action())

            self.cull_completed_requests()

            # TODO: Very infrequently, randomly cancel an agent action

            self._stopping.wait(HSM_COORDINATOR_LOOP_INTERVAL)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号