Woodpecker event registered

This commit is contained in:
Piotr Dec 2025-10-31 23:30:35 +01:00
parent 87e8af3f72
commit 29dfc13a48
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0
3 changed files with 16 additions and 13 deletions

View file

@ -18,9 +18,9 @@ class SimpleEventBus:
self._executor = ThreadPoolExecutor()
def publish(self, event: Event) -> None:
for handler in self._handlers.get(type(event), []):
# Fire-and-forget execution
self._executor.submit(handler, event)
for handler in self._handlers.get(type(event), []):
# Fire-and-forget execution
self._executor.submit(handler, event)
def subscribe(self, event_type: type, handler: Callable) -> None:
if event_type not in self._handlers: