Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion nonebot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ class Config(BaseSettings):

用法:
```conf
SESSION_EXPIRE_TIMEOUT=120 # 单位: 秒
SESSION_EXPIRE_TIMEOUT=[DD ][HH:MM]SS[.ffffff]
yanyongyu marked this conversation as resolved.
Show resolved Hide resolved
SESSION_EXPIRE_TIMEOUT=P[DD]DT[HH]H[MM]M[SS]S # ISO 8601
```
Expand Down
8 changes: 4 additions & 4 deletions website/docs/appendices/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -579,23 +579,23 @@ 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),可以为单位为秒的 `int | float` 等。

<Tabs groupId="configMethod">
<TabItem value="dotenv" label="dotenv" default>

```dotenv
SESSION_EXPIRE_TIMEOUT=120
SESSION_EXPIRE_TIMEOUT=00:02:00
```

</TabItem>
<TabItem value="env" label="系统环境变量">

```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>
Expand Down
Loading