Skip to content

Commit 507eecd

Browse files
rename
1 parent 84a64fc commit 507eecd

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

api/specs/web-server/_long_running_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def delete_async_job(
7070
responses=_export_data_responses,
7171
status_code=status.HTTP_204_NO_CONTENT,
7272
)
73-
def abort_async_job(
73+
def cancel_async_job(
7474
_path_params: Annotated[_PathParam, Depends()],
7575
): ...
7676

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3170,7 +3170,7 @@ paths:
31703170
- long-running-tasks
31713171
summary: Cancel Task
31723172
description: Cancels a task
3173-
operationId: abort_async_job
3173+
operationId: cancel_async_job
31743174
parameters:
31753175
- name: task_id
31763176
in: path

services/web/server/src/simcore_service_webserver/storage/_rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def _create_data_response_from_async_job(
185185
task_id=async_job_id,
186186
task_name=async_job_id,
187187
status_href=f"{request.url.with_path(str(request.app.router['get_async_job_status'].url_for(task_id=async_job_id)))}",
188-
abort_href=f"{request.url.with_path(str(request.app.router['abort_async_job'].url_for(task_id=async_job_id)))}",
188+
abort_href=f"{request.url.with_path(str(request.app.router['cancel_async_job'].url_for(task_id=async_job_id)))}",
189189
result_href=f"{request.url.with_path(str(request.app.router['get_async_job_result'].url_for(task_id=async_job_id)))}",
190190
),
191191
status=status.HTTP_202_ACCEPTED,
@@ -505,7 +505,7 @@ def allow_only_simcore(cls, v: int) -> int:
505505
task_id=_job_id,
506506
task_name=_job_id,
507507
status_href=f"{request.url.with_path(str(request.app.router['get_async_job_status'].url_for(task_id=_job_id)))}",
508-
abort_href=f"{request.url.with_path(str(request.app.router['abort_async_job'].url_for(task_id=_job_id)))}",
508+
abort_href=f"{request.url.with_path(str(request.app.router['cancel_async_job'].url_for(task_id=_job_id)))}",
509509
result_href=f"{request.url.with_path(str(request.app.router['get_async_job_result'].url_for(task_id=_job_id)))}",
510510
),
511511
status=status.HTTP_202_ACCEPTED,

services/web/server/src/simcore_service_webserver/tasks/_rest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async def get_async_jobs(request: web.Request) -> web.Response:
8787
task_id=f"{job.job_id}",
8888
task_name=job.job_name,
8989
status_href=f"{request.url.with_path(str(request.app.router['get_async_job_status'].url_for(task_id=str(job.job_id))))}",
90-
abort_href=f"{request.url.with_path(str(request.app.router['abort_async_job'].url_for(task_id=str(job.job_id))))}",
90+
abort_href=f"{request.url.with_path(str(request.app.router['cancel_async_job'].url_for(task_id=str(job.job_id))))}",
9191
result_href=f"{request.url.with_path(str(request.app.router['get_async_job_result'].url_for(task_id=str(job.job_id))))}",
9292
)
9393
for job in user_async_jobs
@@ -160,12 +160,12 @@ async def delete_async_job(request: web.Request) -> web.Response:
160160

161161
@routes.post(
162162
_task_prefix + "/{task_id}:cancel",
163-
name="abort_async_job",
163+
name="cancel_async_job",
164164
)
165165
@login_required
166166
@permission_required("storage.files.*")
167167
@handle_export_data_exceptions
168-
async def abort_async_job(request: web.Request) -> web.Response:
168+
async def cancel_async_job(request: web.Request) -> web.Response:
169169

170170
_req_ctx = RequestContext.model_validate(request)
171171

services/web/server/tests/unit/with_dbs/01/storage/test_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ async def test_get_async_jobs_status(
538538
],
539539
ids=lambda x: type(x).__name__,
540540
)
541-
async def test_abort_async_jobs(
541+
async def test_cancel_async_jobs(
542542
user_role: UserRole,
543543
logged_user: UserInfoDict,
544544
client: TestClient,

0 commit comments

Comments
 (0)