mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 22:56:31 +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:
parent
f87209f66f
commit
27ac96f5f9
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user