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

timeout 无效 #7

Closed
rachpt opened this issue Feb 19, 2020 · 3 comments
Closed

timeout 无效 #7

rachpt opened this issue Feb 19, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@rachpt
Copy link
Contributor

rachpt commented Feb 19, 2020

self._timeout = 2000 # 每个请求的超时 ms(不包含下载响应体的用时)

requests 里面的 timeout 单位应该是秒, https://stackoverflow.com/a/54619932
这样的话 同时需要为上传文件单独定义一个 timeout 更大的 post函数,或者 timeout使用tuples,https://codeigo.com/python/requests-timeout

@zaxtyson
Copy link
Owner

zaxtyson commented Feb 19, 2020

的确是搞错单位了,https://cn.python-requests.org/zh_CN/latest/user/advanced.html#timeout
马上改👌

@zaxtyson
Copy link
Owner

zaxtyson/LanZouCloud-CMD#9 (comment)
会员用户分卷可以设置为 260 MB,上传超时 3600s 应该够了,也就是平均网速达到 74kb/s 的样子,时间太长估计用户也会强行终止。

@zaxtyson
Copy link
Owner

已经在 dev 分支中修复😁

@zaxtyson zaxtyson added the bug Something isn't working label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants