mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
📝 Docs: 更新 Session Expire Timeout 文档 (#2585)
This commit is contained in:
parent
412b879f39
commit
1a4afa406b
@ -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
|
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user