-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesttodo
Description
Describe the bug
我写了一个 wrapper 用于批量获取所有好友的空间信息. 在加上--download参数下载大量图片时, 有较小的概率发生下载卡住的情况.
To Reproduce
正常调用 python3 exporter.py --all --download
有比较小的几率复现(是否是因为 http 请求没有设置超时时间卡住了, 有些线程一直无法完成?是否应该添加超时时间?)
Expected behavior
调用完成后正常退出.
Screenshots
第一次调用 2000s 后超时退出, 但第二次调用很快就完成了.

Additional context
Log 因为涉及隐私就不贴出了...
就是 start downloading 之后 一堆 xxx is downloaded.
最后卡住不动很久.
args = shlex.split('python3 -u exporter.py ' + os.environ['PARAM'] + ' --download')
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=output_f, stderr=output_f, bufsize=0)
p.stdin.write((target_uin + "\n").encode("utf-8"))
p.stdin.write((my_uin + "\n").encode("utf-8"))
p.stdin.write((login_cookie + "\n").encode("utf-8"))
p.stdin.flush()
p.wait(2000)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesttodo