mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-07 22:10:41 +02:00
fix: update start_task function signature to match original async function
This commit is contained in:
parent
9c9e11ac51
commit
b1d162a28b
@ -2,6 +2,7 @@ import asyncio
|
|||||||
import inspect
|
import inspect
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from functools import wraps
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ class DataService(rpyc.Service):
|
|||||||
self, predicate=inspect.iscoroutinefunction
|
self, predicate=inspect.iscoroutinefunction
|
||||||
):
|
):
|
||||||
|
|
||||||
|
@wraps(method)
|
||||||
def start_task(*args: Any, **kwargs: Any) -> None:
|
def start_task(*args: Any, **kwargs: Any) -> None:
|
||||||
async def task(*args: Any, **kwargs: Any) -> None:
|
async def task(*args: Any, **kwargs: Any) -> None:
|
||||||
try:
|
try:
|
||||||
@ -507,7 +509,6 @@ class DataService(rpyc.Service):
|
|||||||
"type": "method",
|
"type": "method",
|
||||||
"async": asyncio.iscoroutinefunction(value),
|
"async": asyncio.iscoroutinefunction(value),
|
||||||
"parameters": parameters,
|
"parameters": parameters,
|
||||||
"readonly": False,
|
|
||||||
"doc": inspect.getdoc(value),
|
"doc": inspect.getdoc(value),
|
||||||
}
|
}
|
||||||
elif isinstance(getattr(self.__class__, key, None), property):
|
elif isinstance(getattr(self.__class__, key, None), property):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user