Closed Ehco1996 closed 4 years ago
requests库太大,有些地方加载费时。 是什么场景需要自定义超时时间?
On Sun, 6 Sep 2020 at 08:33, Ehco notifications@github.com wrote:
Assigned #114 https://github.com/fzlee/alipay/issues/114 to @fzlee https://github.com/fzlee.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/fzlee/alipay/issues/114#event-3733415859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOYLNMHFSYDRVX4D74JUVTSELKFFANCNFSM4Q3S4PAA .
-- 顺颂时祺
Fazheng Li
主要是query_order的时候,服务起在国外的话,call阿里云的接口会经常timeout
我感觉要是15s还没有返回,加大超时时间大概率也不会有结果。
你暂时试试直接修改我的源代码。超时时间延长,试试有没有效果,如果有的话,我再开放这个选项出来
On Sun, 6 Sep 2020 at 09:28, Ehco notifications@github.com wrote:
主要是query_order的时候,服务起在国外的话,call阿里云的接口会经常timeout
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fzlee/alipay/issues/114#issuecomment-687684871, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOYLNI7GL3VIBM5HBO7GL3SELQVBANCNFSM4Q3S4PAA .
-- 顺颂时祺
Fazheng Li
我感觉要是15s还没有返回,加大超时时间大概率也不会有结果。 你暂时试试直接修改我的源代码。超时时间延长,试试有没有效果,如果有的话,我再开放这个选项出来 On Sun, 6 Sep 2020 at 09:28, Ehco @.***> wrote: 主要是query_order的时候,服务起在国外的话,call阿里云的接口会经常timeout — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#114 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOYLNI7GL3VIBM5HBO7GL3SELQVBANCNFSM4Q3S4PAA . -- 顺颂时祺 Fazheng Li
我是想调小timeout,这样可以多retry几次
有道理,我最近会添加这个参数
On Sun, 6 Sep 2020 at 09:50, Ehco notifications@github.com wrote:
我感觉要是15s还没有返回,加大超时时间大概率也不会有结果。 你暂时试试直接修改我的源代码。超时时间延长,试试有没有效果,如果有的话,我再开放这个选项出来
On Sun, 6 Sep 2020 at 09:28, Ehco @.***> wrote: 主要是query_order的时候,服务起在国外的话,call阿里云的接口会经常timeout — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#114 (comment) https://github.com/fzlee/alipay/issues/114#issuecomment-687684871>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOYLNI7GL3VIBM5HBO7GL3SELQVBANCNFSM4Q3S4PAA . --
顺颂时祺 Fazheng Li
我是想调小timeout,这样可以多retry几次
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fzlee/alipay/issues/114#issuecomment-687686388, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOYLNMRONSWNPYYBGRBEH3SELTEZANCNFSM4Q3S4PAA .
-- 顺颂时祺
Fazheng Li
试试2.1.1 吧
from alipay.utils import AliPayConfig
config = AliPayConfig(timeout=5)
alipay = Alipay(... config=config)
感谢
Is your feature request related to a problem? Please describe. 请求时发现写死了timeout是15s
Describe the solution you'd like 希望能支持timeout参数,另外发现直接用的是urllib库,想问一下为什么不用requests?
Additional context 附上一个sentry截图