Skip to content

Comments

fix: replace hardcoded TTL with DEFAULT_TTL_MS constant in task notifications#3281

Closed
nightcityblade wants to merge 1 commit intoPrefectHQ:mainfrom
nightcityblade:fix/issue-3279
Closed

fix: replace hardcoded TTL with DEFAULT_TTL_MS constant in task notifications#3281
nightcityblade wants to merge 1 commit intoPrefectHQ:mainfrom
nightcityblade:fix/issue-3279

Conversation

@nightcityblade
Copy link

Fixes #3279

Summary

Replace hardcoded 60000 with the DEFAULT_TTL_MS constant from config.py in _send_status_notification() and _send_progress_notification() in subscriptions.py.

This makes subscriptions.py consistent with requests.py, which already imports and uses DEFAULT_TTL_MS.

Changes

  • Import DEFAULT_TTL_MS from fastmcp.server.tasks.config in subscriptions.py
  • Replace "ttl": 60000 with "ttl": DEFAULT_TTL_MS on lines 137 and 202

Tests

Ran task-related tests: uv run pytest tests/ -x -q -k "task" — 353 passed.
Ran ruff linter: all checks passed.

…ications

Replace hardcoded `60000` with the `DEFAULT_TTL_MS` constant from
`config.py` in `_send_status_notification()` and
`_send_progress_notification()` in `subscriptions.py`, consistent
with how `requests.py` already uses the constant.

Fixes PrefectHQ#3279
@marvin-context-protocol marvin-context-protocol bot added bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. server Related to FastMCP server implementation or server-side functionality. labels Feb 23, 2026
@jlowin
Copy link
Member

jlowin commented Feb 23, 2026

Thank you! However, closing for #3280

@jlowin jlowin closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. server Related to FastMCP server implementation or server-side functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Task status/progress notifications hardcode ttl: 60000 instead of using DEFAULT_TTL_MS

2 participants