- Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
With the @task_unique(name)
decorator, the task name is set to ['<name>']
instead of name
. task.unique(name)
sets the name correctly which means that mixing the two behaves unexpectedly.
Test code:
@time_trigger @task_unique('test1') def test(): task.unique('test2') log.warning(task.name2id())
and this is logged
{"['test1']": <Task pending name='Task-2691674' coro=<Function.run_coro() running at /config/custom_components/pyscript/function.py:448>>, 'test2': <Task pending name='Task-2691674' coro=<Function.run_coro() running at /config/custom_components/pyscript/function.py:448>>}
Metadata
Metadata
Assignees
Labels
No labels