Skip to content

Commit 004b02a

Browse files
rename
1 parent 9969b7d commit 004b02a

File tree

4 files changed

+6
-47
lines changed

4 files changed

+6
-47
lines changed

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

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,50 +3127,9 @@ paths:
31273127
delete:
31283128
tags:
31293129
- long-running-tasks
3130-
summary: Delete Task
3131-
description: Deletes a task
3132-
operationId: delete_async_job
3133-
parameters:
3134-
- name: task_id
3135-
in: path
3136-
required: true
3137-
schema:
3138-
type: string
3139-
title: Task Id
3140-
responses:
3141-
'204':
3142-
description: Successful Response
3143-
'404':
3144-
content:
3145-
application/json:
3146-
schema:
3147-
$ref: '#/components/schemas/EnvelopedError'
3148-
description: Not Found
3149-
'403':
3150-
content:
3151-
application/json:
3152-
schema:
3153-
$ref: '#/components/schemas/EnvelopedError'
3154-
description: Forbidden
3155-
'410':
3156-
content:
3157-
application/json:
3158-
schema:
3159-
$ref: '#/components/schemas/EnvelopedError'
3160-
description: Gone
3161-
'500':
3162-
content:
3163-
application/json:
3164-
schema:
3165-
$ref: '#/components/schemas/EnvelopedError'
3166-
description: Internal Server Error
3167-
/v0/tasks/{task_id}:cancel:
3168-
post:
3169-
tags:
3170-
- long-running-tasks
3171-
summary: Cancel Task
3172-
description: Cancels (aborts) a task
3173-
operationId: cancel_async_job
3130+
summary: Cancel And Delete Task
3131+
description: Cancels and deletes a task
3132+
operationId: cancel_and_delete_async_job
31743133
parameters:
31753134
- name: task_id
31763135
in: path

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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['cancel_async_job'].url_for(task_id=_job_id)))}",
508+
abort_href=f"{request.url.with_path(str(request.app.router['cancel_and_delete_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: 1 addition & 1 deletion
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['cancel_async_job'].url_for(task_id=str(job.job_id))))}",
90+
abort_href=f"{request.url.with_path(str(request.app.router['cancel_and_delete_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

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
@@ -650,7 +650,7 @@ async def test_get_user_async_jobs(
650650
TaskStatus,
651651
),
652652
(
653-
"POST",
653+
"DELETE",
654654
"abort_href",
655655
async_jobs.cancel.__name__,
656656
AsyncJobAbort(result=True, job_id=AsyncJobId(_faker.uuid4())),

0 commit comments

Comments
 (0)