-
Notifications
You must be signed in to change notification settings - Fork 32
🎨Send NodeUpdate when computational pipeline completes #8250
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
sanderegg
merged 11 commits into
ITISFoundation:master
from
sanderegg:simultaneous-access/send-event-when-computation-completes
Aug 26, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
88735ef
refactoring
sanderegg d8cd087
refactor
sanderegg fa46189
notify
sanderegg e2e2470
backward compatiblilty
sanderegg ab4ed8e
not sure why
sanderegg e7a0b52
fix
sanderegg 41cb2bd
@GitHK review: remove log
sanderegg e4a9b5d
fixing fixture
sanderegg 9b66a36
improved test to check that update is sent at the end of a computation
sanderegg eadc279
use session loop for pushing stuff
sanderegg 2be91d9
missing scope
sanderegg 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
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
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 |
|---|---|---|
|
|
@@ -276,11 +276,13 @@ async def _mocked_context_manger(*args, **kwargs) -> AsyncIterator[None]: | |
| async def key_version_expected( | ||
| dy_static_file_server_dynamic_sidecar_service: dict, | ||
| dy_static_file_server_service: dict, | ||
| docker_registry_image_injector: Callable, | ||
| docker_registry_image_injector: Callable[ | ||
| [str, str, str | None], Awaitable[dict[str, Any]] | ||
| ], | ||
| ) -> list[tuple[ServiceKeyVersion, bool]]: | ||
| results: list[tuple[ServiceKeyVersion, bool]] = [] | ||
|
|
||
| sleeper_service = docker_registry_image_injector( | ||
| sleeper_service = await docker_registry_image_injector( | ||
| "itisfoundation/sleeper", "2.1.1", "[email protected]" | ||
| ) | ||
|
|
||
|
|
||
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
16 changes: 13 additions & 3 deletions
16
services/web/server/src/simcore_service_webserver/projects/_nodes_repository.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,18 +1,28 @@ | ||
| from aiohttp import web | ||
| from models_library.projects import ProjectID | ||
| from models_library.services_types import ServiceKey, ServiceVersion | ||
| from simcore_postgres_database.utils_projects_nodes import ProjectNodesRepo | ||
| from simcore_postgres_database.utils_projects_nodes import ProjectNode, ProjectNodesRepo | ||
| from simcore_postgres_database.utils_repos import pass_or_acquire_connection | ||
|
|
||
| from ..db.plugin import get_database_engine_legacy | ||
| from ..db.plugin import get_asyncpg_engine | ||
|
|
||
|
|
||
| async def get_project_nodes_services( | ||
| app: web.Application, *, project_uuid: ProjectID | ||
| ) -> list[tuple[ServiceKey, ServiceVersion]]: | ||
| repo = ProjectNodesRepo(project_uuid=project_uuid) | ||
|
|
||
| async with get_database_engine_legacy(app).acquire() as conn: | ||
| async with pass_or_acquire_connection(get_asyncpg_engine(app)) as conn: | ||
| nodes = await repo.list(conn) | ||
|
|
||
| # removes duplicates by preserving order | ||
| return list(dict.fromkeys((node.key, node.version) for node in nodes)) | ||
|
|
||
|
|
||
| async def get_project_nodes( | ||
| app: web.Application, *, project_uuid: ProjectID | ||
| ) -> list[ProjectNode]: | ||
| repo = ProjectNodesRepo(project_uuid=project_uuid) | ||
|
|
||
| async with pass_or_acquire_connection(get_asyncpg_engine(app)) as conn: | ||
| return await repo.list(conn) |
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.
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.