Skip to content

Commit 8b96228

Browse files
committed
Fix lint
1 parent c79ee62 commit 8b96228

2 files changed

Lines changed: 1 addition & 79 deletions

File tree

docs/tutorials/workers.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,4 @@ async with MyWorker() as worker:
3535
# worker is fully shut down here
3636
```
3737

38-
Resources that the worker needs for its entire lifetime can be opened and closed inside [Worker.run][fluid.utils.worker.Worker.run] using normal `async with` statements — no subclassing of lifecycle hooks is required. The example below subclasses [QueueConsumer][fluid.utils.worker.QueueConsumer] to build a worker that accepts text items via [send][fluid.utils.worker.QueueConsumer.send] and uses a [pydantic-ai](https://ai.pydantic.dev/) `Agent` backed by Google Gemini to produce a one-sentence summary for each item:
39-
40-
```python
41-
--8<-- "./examples/docs/worker_context_manager.py"
42-
```
43-
44-
To run this example, create a `.env` file in the project root with your Google AI API key:
45-
46-
```
47-
GOOGLE_API_KEY=your-api-key
48-
```
49-
50-
Then run:
51-
52-
```bash
53-
uv run python examples/docs/worker_context_manager.py
54-
```
38+
Resources that the worker needs for its entire lifetime can be opened and closed inside [Worker.run][fluid.utils.worker.Worker.run] using normal `async with` statements — no subclassing of lifecycle hooks is required.

examples/docs/worker_context_manager.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)