Skip to content

Commit 92add57

Browse files
committed
remove redundant code
1 parent 0a79893 commit 92add57

File tree

3 files changed

+1
-51
lines changed

3 files changed

+1
-51
lines changed

services/api-server/src/simcore_service_api_server/_service_function_jobs.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -466,27 +466,6 @@ async def run_function(
466466
function_class=function.function_class,
467467
)
468468

469-
async def map_function(
470-
self,
471-
*,
472-
function: RegisteredFunction,
473-
pre_registered_function_job_data_list: list[PreRegisteredFunctionJobData],
474-
job_links: JobLinks,
475-
pricing_spec: JobPricingSpecification | None,
476-
x_simcore_parent_project_uuid: ProjectID | None,
477-
x_simcore_parent_node_id: NodeID | None,
478-
) -> None:
479-
480-
for data in pre_registered_function_job_data_list:
481-
await self.run_function(
482-
function=function,
483-
pre_registered_function_job_data=data,
484-
pricing_spec=pricing_spec,
485-
job_links=job_links,
486-
x_simcore_parent_project_uuid=x_simcore_parent_project_uuid,
487-
x_simcore_parent_node_id=x_simcore_parent_node_id,
488-
)
489-
490469
async def function_job_outputs(
491470
self,
492471
*,

services/api-server/src/simcore_service_api_server/celery_worker/worker_tasks/functions_tasks.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -127,31 +127,3 @@ async def run_function(
127127
x_simcore_parent_project_uuid=x_simcore_parent_project_uuid,
128128
x_simcore_parent_node_id=x_simcore_parent_node_id,
129129
)
130-
131-
132-
async def function_map(
133-
task: Task,
134-
task_id: TaskID,
135-
*,
136-
user_identity: Identity,
137-
function: RegisteredFunction,
138-
pre_registered_function_job_data_list: list[PreRegisteredFunctionJobData],
139-
job_links: JobLinks,
140-
pricing_spec: JobPricingSpecification | None,
141-
x_simcore_parent_project_uuid: ProjectID | None,
142-
x_simcore_parent_node_id: NodeID | None,
143-
) -> None:
144-
assert task_id # nosec
145-
app = get_app_server(task.app).app
146-
function_job_service = await _assemble_function_job_service(
147-
app=app, user_identity=user_identity
148-
)
149-
150-
return await function_job_service.map_function(
151-
function=function,
152-
pre_registered_function_job_data_list=pre_registered_function_job_data_list,
153-
pricing_spec=pricing_spec,
154-
job_links=job_links,
155-
x_simcore_parent_project_uuid=x_simcore_parent_project_uuid,
156-
x_simcore_parent_node_id=x_simcore_parent_node_id,
157-
)

services/api-server/src/simcore_service_api_server/celery_worker/worker_tasks/tasks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from ...models.api_resources import JobLinks
1919
from ...models.domain.functions import PreRegisteredFunctionJobData
2020
from ...models.schemas.jobs import JobInputs, JobPricingSpecification
21-
from .functions_tasks import function_map, run_function
21+
from .functions_tasks import run_function
2222

2323
_logger = logging.getLogger(__name__)
2424

@@ -43,4 +43,3 @@ def setup_worker_tasks(app: Celery) -> None:
4343

4444
with log_context(_logger, logging.INFO, msg="worker task registration"):
4545
register_task(app, run_function)
46-
register_task(app, function_map)

0 commit comments

Comments
 (0)