网页
综合
更新时间 2026-11-16 08:45:13
Background Tasks - Starlette
自动蜘蛛
starlette.dev
正文约 512 字
Starlette includes a BackgroundTask class for in-process background tasks.
A background task should be attached to a response, and will run only once the response has been sent.
Used to add a single background task to a response.
Signature: BackgroundTask(func, *args, **kwargs)
Used to add multiple background tasks to a response.
Signature: BackgroundTasks(tasks=[])
The tasks are executed in order. In case one of the tasks raises an exception, the following tasks will not get the opportunity to be executed.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。