📝 Docs: 更新 Session Expire Timeout​ 文档 (#2585)

This commit is contained in:
MingxuanGame 2024-02-22 13:59:57 +08:00 committed by GitHub
parent 412b879f39
commit 1a4afa406b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -461,9 +461,8 @@ class Config(BaseSettings):
用法: 用法:
```conf ```conf
SESSION_EXPIRE_TIMEOUT=120 # 单位: 秒 SESSION_EXPIRE_TIMEOUT=[-][DD]D[,][HH:MM:]SS[.ffffff]
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=P[DD]DT[HH]H[MM]M[SS]S # ISO 8601
``` ```
""" """

View File

@ -579,13 +579,13 @@ nonebot.init(command_start={"/", ""}, command_sep={".", " "})
- **类型**: `timedelta` - **类型**: `timedelta`
- **默认值**: `timedelta(minutes=2)` - **默认值**: `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"> <Tabs groupId="configMethod">
<TabItem value="dotenv" label="dotenv" default> <TabItem value="dotenv" label="dotenv" default>
```dotenv ```dotenv
SESSION_EXPIRE_TIMEOUT=120 SESSION_EXPIRE_TIMEOUT=00:02:00
``` ```
</TabItem> </TabItem>
@ -593,9 +593,9 @@ SESSION_EXPIRE_TIMEOUT=120
```bash ```bash
# windows # windows
set SESSION_EXPIRE_TIMEOUT '120' set SESSION_EXPIRE_TIMEOUT '00:02:00'
# linux/macOS # linux/macOS
export SESSION_EXPIRE_TIMEOUT='120' export SESSION_EXPIRE_TIMEOUT='00:02:00'
``` ```
</TabItem> </TabItem>