fix: replace hardcoded TTL with DEFAULT_TTL_MS constant in task notifications#3281
Closed
nightcityblade wants to merge 1 commit intoPrefectHQ:mainfrom
Closed
fix: replace hardcoded TTL with DEFAULT_TTL_MS constant in task notifications#3281nightcityblade wants to merge 1 commit intoPrefectHQ:mainfrom
nightcityblade wants to merge 1 commit intoPrefectHQ:mainfrom
Conversation
…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
Member
|
Thank you! However, closing for #3280 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3279
Summary
Replace hardcoded
60000with theDEFAULT_TTL_MSconstant fromconfig.pyin_send_status_notification()and_send_progress_notification()insubscriptions.py.This makes
subscriptions.pyconsistent withrequests.py, which already imports and usesDEFAULT_TTL_MS.Changes
DEFAULT_TTL_MSfromfastmcp.server.tasks.configinsubscriptions.py"ttl": 60000with"ttl": DEFAULT_TTL_MSon lines 137 and 202Tests
Ran task-related tests:
uv run pytest tests/ -x -q -k "task"— 353 passed.Ran ruff linter: all checks passed.