-
Notifications
You must be signed in to change notification settings - Fork 32
♻️ Refactor: migrate more aiohttp app keys to type-safe web.AppKey (follow up)
#8452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pcrespov
merged 15 commits into
ITISFoundation:master
from
pcrespov:is7734/more-app-keys
Oct 6, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c1d2388
🎨 Refactor socketio handler keys to use web.AppKey for improved clari…
pcrespov f891dd8
🎨 Refactor long-running tasks manager key to use web.AppKey for consi…
pcrespov 11e5856
🎨 Refactor long-running tasks context key to use RQT_LONG_RUNNING_TAS…
pcrespov fde8d59
🎨 Refactor permalink factory key to use PROJECT_PERMALINK_FACTORY for…
pcrespov e932e34
🎨 Refactor resource manager keys to use CLIENT_SOCKET_REGISTRY_APPKEY…
pcrespov cda3add
🎨 Refactor long-running tasks context key to use LONG_RUNNING_TASKS_C…
pcrespov 7ad98c2
🎨 Refactor APP_CLIENT_SOCKET_SERVER_APPKEY definition for clarity and…
pcrespov c0d24c7
🎨 Refactor socket server key definitions for consistency
pcrespov b8d94a8
minor
pcrespov 06e176b
🎨 Refactor long-running tasks context key for consistency and clarity
pcrespov 9b149f0
minor
pcrespov ef92407
fix
pcrespov a8a6a04
new mypy handles this better
pcrespov 49ba553
Merge branch 'master' into is7734/more-app-keys
pcrespov 55a8ca3
Merge branch 'master' into is7734/more-app-keys
pcrespov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
packages/service-library/src/servicelib/aiohttp/long_running_tasks/__init__.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| from . import server | ||
| from ._request import LONG_RUNNING_TASKS_CONTEXT_REQKEY | ||
|
|
||
| __all__ = ("server",) | ||
| __all__: tuple[str, ...] = ( | ||
| "server", | ||
| "LONG_RUNNING_TASKS_CONTEXT_REQKEY", | ||
| ) |
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
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
8 changes: 4 additions & 4 deletions
8
packages/service-library/src/servicelib/aiohttp/long_running_tasks/_request.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| from typing import Any | ||
| from typing import Any, Final | ||
|
|
||
| from aiohttp import web | ||
|
|
||
| from ._constants import RQT_LONG_RUNNING_TASKS_CONTEXT_KEY | ||
| LONG_RUNNING_TASKS_CONTEXT_REQKEY: Final = f"{__name__}.long_running_tasks.context" | ||
|
|
||
|
|
||
| def get_task_context(request: web.Request) -> dict[str, Any]: | ||
| output: dict[str, Any] = request[RQT_LONG_RUNNING_TASKS_CONTEXT_KEY] | ||
| return output | ||
| ctx: dict[str, Any] = request[LONG_RUNNING_TASKS_CONTEXT_REQKEY] | ||
| return ctx |
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
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
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
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
2 changes: 0 additions & 2 deletions
2
services/web/server/src/simcore_service_webserver/resource_manager/_constants.py
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.