2323 PresignedLink ,
2424)
2525from models_library .generics import Envelope
26- from models_library .projects_pipeline import ComputationTask
26+ from models_library .projects_pipeline import ComputationTask , PipelineDetails
2727from models_library .projects_state import RunningState
2828from models_library .utils .fastapi_encoders import jsonable_encoder
2929from pydantic import AnyUrl , ByteSize , TypeAdapter
@@ -111,11 +111,13 @@ def create_computation_cb(url, **kwargs) -> CallbackResult:
111111 update = {
112112 "id" : f"{ kwargs ['json' ]['project_id' ]} " ,
113113 "state" : state ,
114- "pipeline_details" : {
115- "adjacency_list" : pipeline ,
116- "node_states" : node_states ,
117- "progress" : 0 ,
118- },
114+ "pipeline_details" : PipelineDetails (
115+ ** {
116+ "adjacency_list" : pipeline ,
117+ "node_states" : node_states ,
118+ "progress" : 0 ,
119+ }
120+ ),
119121 }
120122 )
121123 return CallbackResult (
@@ -140,11 +142,13 @@ def get_computation_cb(url, **kwargs) -> CallbackResult:
140142 update = {
141143 "id" : Path (url .path ).name ,
142144 "state" : state ,
143- "pipeline_details" : {
144- "adjacency_list" : pipeline ,
145- "node_states" : node_states ,
146- "progress" : 0 ,
147- },
145+ "pipeline_details" : PipelineDetails (
146+ ** {
147+ "adjacency_list" : pipeline ,
148+ "node_states" : node_states ,
149+ "progress" : 0 ,
150+ }
151+ ),
148152 }
149153 )
150154
0 commit comments