File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -240,8 +240,6 @@ async def _wrapper() -> None:
240240
241241 async def _build_producer_graph (self ) -> None :
242242 """Builds the producer graph for the component."""
243- # TODO : How to handle the case of recursion, i.e., a component which is both a producer and
244- # : consumer of a given event?
245243 if not (self ._state and self ._state_is_connected ):
246244 self ._logger .warning ("State backend not connected. Cannot build producer graph." )
247245 return
@@ -250,6 +248,10 @@ async def _build_producer_graph(self) -> None:
250248 input_event_set .remove (StopEvent .safe_type ())
251249 for comp_id , comp_data in process ["components" ].items ():
252250 for evt in input_event_set .intersection (comp_data ["io" ]["output_events" ]):
251+ if comp_id == self .id :
252+ # TODO : How to handle the case of recursion, i.e., a component which is both
253+ # : a producer and consumer of a given event?
254+ continue # Skip self to avoid indefinite hanging
253255 self ._event_producers [evt ].add (comp_id )
254256
255257 async def _update_producer_graph (self ) -> None :
You can’t perform that action at this time.
0 commit comments