mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-01-18 18:02:24 +01:00
Skip coroutines with arguments instead of raising an exception
This commit is contained in:
committed by
B108 Rpi Server
parent
46868743c7
commit
eacd5bc6b1
@@ -107,12 +107,13 @@ class TaskManager:
|
||||
method = getattr(self.service, name)
|
||||
if inspect.iscoroutinefunction(method):
|
||||
if function_has_arguments(method):
|
||||
raise TaskDefinitionError(
|
||||
logger.info(
|
||||
"Asynchronous functions (tasks) should be defined without "
|
||||
f"arguments. The task '{method.__name__}' has at least one "
|
||||
"argument. Please remove the argument(s) from this function to "
|
||||
"use it."
|
||||
)
|
||||
"use it in the frontend."
|
||||
)
|
||||
continue
|
||||
|
||||
# create start and stop methods for each coroutine
|
||||
setattr(
|
||||
|
||||
Reference in New Issue
Block a user