mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-19 20:14:17 +02:00
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>
17 lines
424 B
Python
17 lines
424 B
Python
"""Shared fixtures for task tests."""
|
|
|
|
import pytest
|
|
|
|
from fastmcp.utilities.tests import temporary_settings
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
async def enable_tasks():
|
|
"""Enable task protocol support for all task tests."""
|
|
with temporary_settings(enable_tasks=True):
|
|
# Verify enabled
|
|
import fastmcp
|
|
|
|
assert fastmcp.settings.enable_tasks, "Tasks should be enabled after fixture"
|
|
|
|
yield
|