File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
services/director-v2/src/simcore_service_director_v2/modules/db/repositories Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -175,15 +175,20 @@ async def _sequentially_upsert_tasks_from_project(
175175
176176 # insert or update the remaining tasks
177177 # NOTE: comp_tasks DB only trigger a notification to the webserver if an UPDATE on comp_tasks.outputs or comp_tasks.state is done
178+ # NOTE: an exception to this is when a frontend service changes its output since there is no node_ports, the UPDATE must be done here.
178179 for comp_task_db in list_of_comp_tasks_in_project :
179180
180181 insert_stmt = insert (comp_tasks ).values (
181182 ** comp_task_db .dict (by_alias = True , exclude_unset = True )
182183 )
184+
185+ exclusion_rule = {"state" }
186+ if to_node_class (comp_task_db .image .name ) != NodeClass .FRONTEND :
187+ exclusion_rule .add ("outputs" )
183188 on_update_stmt = insert_stmt .on_conflict_do_update (
184189 index_elements = [comp_tasks .c .project_id , comp_tasks .c .node_id ],
185190 set_ = comp_task_db .dict (
186- by_alias = True , exclude_unset = True , exclude = { "outputs" , "state" }
191+ by_alias = True , exclude_unset = True , exclude = exclusion_rule
187192 ),
188193 )
189194 await self .connection .execute (on_update_stmt )
You can’t perform that action at this time.
0 commit comments