From 27ac96f5f9a6f58c691027c5f692d57aedee78ff Mon Sep 17 00:00:00 2001 From: Mike Degatano Date: Thu, 4 Aug 2022 12:33:54 -0400 Subject: [PATCH] Attach is in executor, use `call_soon_threadsafe` (#3771) * Attach is in executor, use `call_soon_threadsafe` * Fix formatting --- supervisor/docker/interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supervisor/docker/interface.py b/supervisor/docker/interface.py index 9fab4672c..849802661 100644 --- a/supervisor/docker/interface.py +++ b/supervisor/docker/interface.py @@ -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())