Skip to content

Commit

Permalink
Fix for #416
Browse files Browse the repository at this point in the history
An instance's id value was appended to a task name for reasons that
are lost in the mists of time. Presumably it was to disambiguate tasks
with the same name but different instances. However, this doesn't make
sense since tasks live in namespaces unique to instances, and the
disambiguation is not necessary.
  • Loading branch information
JnyJny committed Nov 26, 2024
1 parent 7eb7324 commit e9ee49f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions busylight/lights/taskable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""

import asyncio

from typing import Any, Awaitable, Dict, Optional


Expand Down Expand Up @@ -45,8 +44,6 @@ def add_task(self, name: str, coroutine: Awaitable) -> asyncio.Task:
except KeyError:
pass

name += f"-{id(self)}"

# >py3.7, create_task takes a `name` parameter
self.tasks[name] = self.event_loop.create_task(coroutine(self))

Expand Down

0 comments on commit e9ee49f

Please sign in to comment.