ezmsg-org / ezmsg

Pure-Python DAG-based high-performance SHM-backed pub-sub and multi-processing pattern
https://ezmsg.readthedocs.io/en/latest/
MIT License
10 stars 5 forks source link

Request: Better error handling/communication when tasks are defined on Collections #21

Open griffinmilsap opened 1 year ago

griffinmilsap commented 1 year ago

Collections cannot have tasks, but if you add tasks/publishers/subscribers to a collection, they'll just silently not run. This needs to be addressed; I just spend like 20 minutes debugging why my subscriber wasn't running, and it was because I accidentially made my Unit inherit from Collection instead of Unit... ugh

griffinmilsap commented 1 year ago

Additionally, this resulted in me creating STATE for the "Collection" which was never initialized (obviously) and resulted in confusing behavior that was unhelpful to tracking down the root issue. We should also issue errors when a subclass of STATE is provided to a Collection.