mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
removes defaults in Task and PerInstanceTaskDescriptor
Removes overhead of keeping defaults the same everywhere.
This commit is contained in:
parent
1b35dba64f
commit
db559e8ada
@ -30,13 +30,13 @@ class PerInstanceTaskDescriptor(Generic[R]):
|
|||||||
self,
|
self,
|
||||||
func: Callable[[Any], Coroutine[None, None, R]]
|
func: Callable[[Any], Coroutine[None, None, R]]
|
||||||
| Callable[[], Coroutine[None, None, R]],
|
| Callable[[], Coroutine[None, None, R]],
|
||||||
autostart: bool = False,
|
autostart: bool,
|
||||||
restart_on_failure: bool = False,
|
restart_on_failure: bool,
|
||||||
restart_sec: float = 1.0,
|
restart_sec: float,
|
||||||
start_limit_interval_sec: float | None = None,
|
start_limit_interval_sec: float | None,
|
||||||
start_limit_burst: int = 3,
|
start_limit_burst: int,
|
||||||
timeout_start_sec: float = 0.0,
|
timeout_start_sec: float,
|
||||||
exit_on_failure: bool = False,
|
exit_on_failure: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.__func = func
|
self.__func = func
|
||||||
self.__autostart = autostart
|
self.__autostart = autostart
|
||||||
|
@ -92,13 +92,13 @@ class Task(pydase.data_service.data_service.DataService, Generic[R]):
|
|||||||
self,
|
self,
|
||||||
func: Callable[[], Coroutine[None, None, R | None]],
|
func: Callable[[], Coroutine[None, None, R | None]],
|
||||||
*,
|
*,
|
||||||
autostart: bool = False,
|
autostart: bool,
|
||||||
restart_on_failure: bool = False,
|
restart_on_failure: bool,
|
||||||
restart_sec: float = 1.0,
|
restart_sec: float,
|
||||||
start_limit_interval_sec: float | None = None,
|
start_limit_interval_sec: float | None,
|
||||||
start_limit_burst: int = 3,
|
start_limit_burst: int,
|
||||||
timeout_start_sec: float = 0.0,
|
timeout_start_sec: float,
|
||||||
exit_on_failure: bool = False,
|
exit_on_failure: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._autostart = autostart
|
self._autostart = autostart
|
||||||
|
Loading…
x
Reference in New Issue
Block a user