Skip to content

Commit cdabc03

Browse files
committed
refactor
1 parent abd060c commit cdabc03

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

services/web/server/src/simcore_service_webserver/exporter/_handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .._constants import RQ_PRODUCT_KEY
1313
from .._meta import API_VTAG
1414
from ..login.decorators import login_required
15-
from ..projects.projects_api import with_project_locked_notified_state
15+
from ..projects.projects_api import with_project_locked_and_notify
1616
from ..security.decorators import permission_required
1717
from ..users.api import get_user_fullname
1818
from ._formatter.archive import get_sds_archive_path
@@ -43,7 +43,7 @@ async def export_project(request: web.Request):
4343
project_uuid = request.match_info.get("project_id")
4444
assert project_uuid # nosec
4545

46-
@with_project_locked_notified_state(
46+
@with_project_locked_and_notify(
4747
request.app,
4848
project_uuid=project_uuid,
4949
status=ProjectStatus.EXPORTING,

services/web/server/src/simcore_service_webserver/projects/_crud_api_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ async def _copy() -> None:
180180
await long_running_task.result()
181181

182182
if needs_lock_source_project:
183-
await projects_api.with_project_locked_notified_state(
183+
await projects_api.with_project_locked_and_notify(
184184
app,
185185
project_uuid=source_project["uuid"],
186186
status=ProjectStatus.CLONING,

services/web/server/src/simcore_service_webserver/projects/projects_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,13 +1261,13 @@ async def try_open_project_for_user(
12611261
"""
12621262
try:
12631263

1264-
@with_project_locked_notified_state(
1264+
@with_project_locked_and_notify(
12651265
app,
12661266
project_uuid=project_uuid,
12671267
status=ProjectStatus.OPENING,
12681268
user_id=user_id,
12691269
user_name=await get_user_fullname(app, user_id=user_id),
1270-
notify_users=False,
1270+
notify_users=True,
12711271
)
12721272
async def _open_project() -> bool:
12731273
with managed_resource(user_id, client_session_id, app) as user_session:
@@ -1757,7 +1757,7 @@ async def remove_project_dynamic_services(
17571757
save_state = False
17581758
# -------------------
17591759

1760-
@with_project_locked_notified_state(
1760+
@with_project_locked_and_notify(
17611761
app,
17621762
project_uuid=project_uuid,
17631763
status=ProjectStatus.CLOSING,
@@ -1864,7 +1864,7 @@ async def retrieve_and_notify_project_locked_state(
18641864
R = TypeVar("R")
18651865

18661866

1867-
def with_project_locked_notified_state(
1867+
def with_project_locked_and_notify(
18681868
app: web.Application,
18691869
*,
18701870
project_uuid: str,

services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__delete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from simcore_service_webserver.projects import _crud_api_delete
3838
from simcore_service_webserver.projects.models import ProjectDict
3939
from simcore_service_webserver.projects.projects_api import (
40-
with_project_locked_notified_state,
40+
with_project_locked_and_notify,
4141
)
4242
from socketio.exceptions import ConnectionError as SocketConnectionError
4343

@@ -230,7 +230,7 @@ async def test_delete_project_while_it_is_locked_raises_error(
230230

231231
project_uuid = user_project["uuid"]
232232
user_id = logged_user["id"]
233-
await with_project_locked_notified_state(
233+
await with_project_locked_and_notify(
234234
app=client.app,
235235
project_uuid=project_uuid,
236236
status=ProjectStatus.CLOSING,

0 commit comments

Comments
 (0)