mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-23 09:30:02 +02:00
fixes task manager loop
This commit is contained in:
parent
316ce5c7e7
commit
c733026522
@ -77,7 +77,6 @@ class TaskManager:
|
|||||||
|
|
||||||
def __init__(self, service: DataService) -> None:
|
def __init__(self, service: DataService) -> None:
|
||||||
self.service = service
|
self.service = service
|
||||||
self._loop = asyncio.get_event_loop()
|
|
||||||
|
|
||||||
self.tasks: dict[str, TaskDict] = {}
|
self.tasks: dict[str, TaskDict] = {}
|
||||||
"""A dictionary to keep track of running tasks. The keys are the names of the
|
"""A dictionary to keep track of running tasks. The keys are the names of the
|
||||||
@ -87,6 +86,10 @@ class TaskManager:
|
|||||||
|
|
||||||
self._set_start_and_stop_for_async_methods()
|
self._set_start_and_stop_for_async_methods()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _loop(self) -> asyncio.AbstractEventLoop:
|
||||||
|
return asyncio.get_running_loop()
|
||||||
|
|
||||||
def _set_start_and_stop_for_async_methods(self) -> None:
|
def _set_start_and_stop_for_async_methods(self) -> None:
|
||||||
# inspect the methods of the class
|
# inspect the methods of the class
|
||||||
for name, method in inspect.getmembers(
|
for name, method in inspect.getmembers(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user