Skip to content

文档 拉取(Pull)数据 里面有错误 #163

@Tomatosky

Description

@Tomatosky

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 的结果也是不可迭代的

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions