Remove enable_docket setting; Docket is now always on

Docket provides background task execution and is now always available
for all FastMCP servers. Only `enable_tasks` remains to control the
SEP-1686 task protocol support.

Changes:
- Remove `enable_docket` setting and related validation
- Docket/Worker lifecycle is always active in server lifespan
- CurrentDocket and CurrentWorker dependencies work without config
- Add server readiness signaling via `_started` event
- Fix test timing issues with proper port probing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chris Guidry 2025-12-05 11:39:25 -05:00
commit 47d3044b06
21 changed files with 150 additions and 303 deletions

View file

@ -55,11 +55,8 @@ Background tasks require explicit opt-in:
| Environment Variable | Default | Description |
|---------------------|---------|-------------|
| `FASTMCP_ENABLE_TASKS` | `false` | Enable the MCP task protocol |
| `FASTMCP_ENABLE_DOCKET` | `false` | Enable the Docket task system |
| `FASTMCP_DOCKET_URL` | `memory://` | Backend URL (`memory://` or `redis://host:port/db`) |
Both `ENABLE_TASKS` and `ENABLE_DOCKET` must be `true` for background tasks to work.
You can also set a server-wide default in the constructor:
```python