docs: add code fences to Example: docstring blocks (#2104)
This commit is contained in:
parent
c0328540c9
commit
cb07adeca3
1 changed files with 83 additions and 18 deletions
|
|
@ -118,14 +118,20 @@ class ExperimentalHandlers(Generic[LifespanResultT]):
|
|||
The TaskSupport configuration object
|
||||
|
||||
Example:
|
||||
# Simple in-memory setup
|
||||
server.experimental.enable_tasks()
|
||||
Simple in-memory setup:
|
||||
|
||||
# Custom store/queue for distributed systems
|
||||
```python
|
||||
server.experimental.enable_tasks()
|
||||
```
|
||||
|
||||
Custom store/queue for distributed systems:
|
||||
|
||||
```python
|
||||
server.experimental.enable_tasks(
|
||||
store=RedisTaskStore(redis_url),
|
||||
queue=RedisTaskMessageQueue(redis_url),
|
||||
)
|
||||
```
|
||||
|
||||
WARNING: This API is experimental and may change without notice.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue