https://aliyun-log-python-sdk.readthedocs.io/README_CN.html#pull
# 或者大并发直接下载在本地
it = client.pull_log('project1', 'logstore1', from_time="2018-1-1 10:10:10", to_time="2018-1-1 10:20:10", file_path="/data/dump_{}.data")
for res in it:
res.log_print()
这里应该写错了,应该是 client.pull_log_dump 而不是 client.pull_log;
另外 pull_log_dump 中使用了进程池,例子中需要加 if __name__ == '__main__': ,不然会报错 concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending
而且似乎 pull_log_dump 的结果也是不可迭代的
https://aliyun-log-python-sdk.readthedocs.io/README_CN.html#pull
这里应该写错了,应该是
client.pull_log_dump而不是client.pull_log;另外
pull_log_dump中使用了进程池,例子中需要加if __name__ == '__main__':,不然会报错concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending而且似乎
pull_log_dump的结果也是不可迭代的