steem_client.py 文件源码

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

项目:hivemind 作者: steemit 项目源码 文件源码
def __exec_batch(self, method, params):
        time_start = time.perf_counter()
        result = None

        if self._jussi:
            tries = 0
            while True:
                try:
                    result = list(self._client.exec_batch(method, params, batch_size=500))
                    break
                except (AssertionError, RPCError) as e:
                    tries += 1
                    print("batch {} failure, retry in {}s -- {}".format(method, tries, e))
                    time.sleep(tries)
                    continue
        else:
            result = list(self._client.exec_multi_with_futures(
                method, params, max_workers=10))

        total_time = int((time.perf_counter() - time_start) * 1000)
        ClientStats.log("%s()" % method, total_time, len(params))
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号