Skip to content

Commit

Permalink
fix: 修改超时时间示例,增加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
NanmiCoder committed Mar 31, 2024
1 parent caedbf3 commit 01a3181
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/server/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
PROXY = None

# 请求超时时间配置
timeoute = (10, 30) # 建立连接最大超时时间是10s,读取响应的最大超时时间是30s
timeout = (10, 30) # 建立连接最大超时时间是10s,读取响应的最大超时时间是30s

# 初始化
wxpay = WeChatPay(
Expand All @@ -59,8 +59,9 @@
cert_dir=CERT_DIR,
logger=LOGGER,
partner_mode=PARTNER_MODE,
timeout=(10, 30),
proxy=PROXY)
proxy=PROXY,
timeout=timeout,
)

app = Flask(__name__)

Expand Down
1 change: 1 addition & 0 deletions wechatpayv3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self,
:param logger: 日志记录器,示例值logging.getLoger('demo')
:param partner_mode: 接入模式,默认False为直连商户模式,True为服务商模式
:param proxy: 代理设置,示例值:{"https": "http://10.10.1.10:1080"}
:param timeout: 超时时间,示例值:(10, 30), 10为建立连接的最大超时时间,30为读取响应的最大超时实践
"""
from .core import Core

Expand Down

0 comments on commit 01a3181

Please sign in to comment.