1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Attach is in executor, use call_soon_threadsafe (#3771)

* Attach is in executor, use `call_soon_threadsafe`

* Fix formatting
This commit is contained in:
Mike Degatano
2022-08-04 12:33:54 -04:00
committed by GitHub
parent f87209f66f
commit 27ac96f5f9

View File

@@ -352,7 +352,8 @@ class DockerInterface(CoreSysAttributes):
and state in [ContainerState.STOPPED, ContainerState.FAILED]
):
# Fire event with current state of container
self.sys_bus.fire_event(
self.sys_loop.call_soon_threadsafe(
self.sys_bus.fire_event,
BusEvent.DOCKER_CONTAINER_STATE_CHANGE,
DockerContainerStateEvent(
self.name, state, docker_container.id, int(time())