mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-02-14 14:28:40 +01:00
fix: adds start_stop_task callbacks to lists
This commit is contained in:
@@ -359,6 +359,12 @@ class CallbackManager:
|
|||||||
attrs: dict[str, Any] = get_class_and_instance_attributes(obj)
|
attrs: dict[str, Any] = get_class_and_instance_attributes(obj)
|
||||||
|
|
||||||
for nested_attr_name, nested_attr in attrs.items():
|
for nested_attr_name, nested_attr in attrs.items():
|
||||||
|
if isinstance(nested_attr, DataServiceList):
|
||||||
|
for i, item in enumerate(nested_attr):
|
||||||
|
if isinstance(item, AbstractDataService):
|
||||||
|
self._register_start_stop_task_callbacks(
|
||||||
|
item, parent_path=f"{parent_path}.{nested_attr_name}[{i}]"
|
||||||
|
)
|
||||||
if isinstance(nested_attr, AbstractDataService):
|
if isinstance(nested_attr, AbstractDataService):
|
||||||
self._register_start_stop_task_callbacks(
|
self._register_start_stop_task_callbacks(
|
||||||
nested_attr, parent_path=f"{parent_path}.{nested_attr_name}"
|
nested_attr, parent_path=f"{parent_path}.{nested_attr_name}"
|
||||||
|
|||||||
Reference in New Issue
Block a user