mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-27 18:45:05 +08:00
📝 Docs: 更新 Session Expire Timeout 文档 (#2585)
This commit is contained in:
parent
412b879f39
commit
1a4afa406b
@ -461,9 +461,8 @@ class Config(BaseSettings):
|
||||
|
||||
用法:
|
||||
```conf
|
||||
SESSION_EXPIRE_TIMEOUT=120 # 单位: 秒
|
||||
SESSION_EXPIRE_TIMEOUT=[DD ][HH:MM]SS[.ffffff]
|
||||
SESSION_EXPIRE_TIMEOUT=P[DD]DT[HH]H[MM]M[SS]S # ISO 8601
|
||||
SESSION_EXPIRE_TIMEOUT=[-][DD]D[,][HH:MM:]SS[.ffffff]
|
||||
SESSION_EXPIRE_TIMEOUT=[±]P[DD]DT[HH]H[MM]M[SS]S # ISO 8601
|
||||
```
|
||||
"""
|
||||
|
||||
|
@ -579,13 +579,13 @@ nonebot.init(command_start={"/", ""}, command_sep={".", " "})
|
||||
- **类型**: `timedelta`
|
||||
- **默认值**: `timedelta(minutes=2)`
|
||||
|
||||
用户会话超时时间,配置格式参考 [Datetime Types](https://docs.pydantic.dev/usage/types/#datetime-types),可以为单位为秒的 `int | float` 等。
|
||||
用户会话超时时间,配置格式参考 [Datetime Types](https://docs.pydantic.dev/latest/api/standard_library_types/#datetimetimedelta)。
|
||||
|
||||
<Tabs groupId="configMethod">
|
||||
<TabItem value="dotenv" label="dotenv" default>
|
||||
|
||||
```dotenv
|
||||
SESSION_EXPIRE_TIMEOUT=120
|
||||
SESSION_EXPIRE_TIMEOUT=00:02:00
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
@ -593,9 +593,9 @@ SESSION_EXPIRE_TIMEOUT=120
|
||||
|
||||
```bash
|
||||
# windows
|
||||
set SESSION_EXPIRE_TIMEOUT '120'
|
||||
set SESSION_EXPIRE_TIMEOUT '00:02:00'
|
||||
# linux/macOS
|
||||
export SESSION_EXPIRE_TIMEOUT='120'
|
||||
export SESSION_EXPIRE_TIMEOUT='00:02:00'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
Loading…
Reference in New Issue
Block a user