Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 低几率发生下载完成后不能退出的情况 #47

Open
lyc8503 opened this issue Mar 31, 2020 · 1 comment
Open

[BUG] 低几率发生下载完成后不能退出的情况 #47

lyc8503 opened this issue Mar 31, 2020 · 1 comment
Labels
bug Something isn't working enhancement New feature or request todo

Comments

@lyc8503
Copy link

lyc8503 commented Mar 31, 2020

Describe the bug
我写了一个 wrapper 用于批量获取所有好友的空间信息. 在加上--download参数下载大量图片时, 有较小的概率发生下载卡住的情况.

To Reproduce
正常调用 python3 exporter.py --all --download
有比较小的几率复现(是否是因为 http 请求没有设置超时时间卡住了, 有些线程一直无法完成?是否应该添加超时时间?)

Expected behavior
调用完成后正常退出.

Screenshots
第一次调用 2000s 后超时退出, 但第二次调用很快就完成了.
QQ截图20200331141800

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)
@lyc8503 lyc8503 added the bug Something isn't working label Mar 31, 2020
@wwwpf wwwpf added the todo label Apr 6, 2020
@wwwpf
Copy link
Owner

wwwpf commented Aug 7, 2021

后面有空再修吧。

@wwwpf wwwpf added the enhancement New feature or request label Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request todo
Projects
None yet
Development

No branches or pull requests

2 participants