File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
services/api-server/src/simcore_service_api_server Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -439,3 +439,10 @@ async def create_studies_job(
439439 project_id = project .uuid , new_inputs = new_project_inputs
440440 )
441441 return job
442+
443+ async def inspect_study_job (self , * , job_id : JobID ) -> JobStatus :
444+ task = await self ._director2_api .get_computation (
445+ project_id = job_id , user_id = self .user_id
446+ )
447+ job_status : JobStatus = create_jobstatus_from_task (task )
448+ return job_status
Original file line number Diff line number Diff line change 3535 start_project ,
3636 stop_project ,
3737)
38- from ...services_http .solver_job_models_converters import create_jobstatus_from_task
3938from ...services_http .storage import StorageApi
4039from ...services_http .study_job_models_converters import (
4140 create_job_outputs_from_project_outputs ,
@@ -283,15 +282,12 @@ async def stop_study_job(
283282async def inspect_study_job (
284283 study_id : StudyID ,
285284 job_id : JobID ,
286- user_id : Annotated [PositiveInt , Depends (get_current_user_id )],
287- director2_api : Annotated [DirectorV2Api , Depends (get_api_client (DirectorV2Api ))],
285+ job_service : Annotated [JobService , Depends (get_job_service )],
288286) -> JobStatus :
289287 job_name = _compose_job_resource_name (study_id , job_id )
290288 _logger .debug ("Inspecting Job '%s'" , job_name )
291289
292- task = await director2_api .get_computation (project_id = job_id , user_id = user_id )
293- job_status : JobStatus = create_jobstatus_from_task (task )
294- return job_status
290+ return await job_service .inspect_study_job (job_id = job_id )
295291
296292
297293@router .post (
You can’t perform that action at this time.
0 commit comments