From 2109b5039eb0b28cbc5a1bf5d70a5e4ef37ff13d Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Wed, 14 Feb 2024 10:34:25 -0500 Subject: [PATCH] Fixes "Task was destroyed but it is pending" * asyncio.gather expects *tasks .. gotta unpack the list --- awx/main/wsrelay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/wsrelay.py b/awx/main/wsrelay.py index 5f3d165153..833cdcc7b8 100644 --- a/awx/main/wsrelay.py +++ b/awx/main/wsrelay.py @@ -339,7 +339,7 @@ class WebSocketRelayManager(object): if deleted_remote_hosts: logger.info(f"Removing {deleted_remote_hosts} from websocket broadcast list") - await asyncio.gather(self.cleanup_offline_host(h) for h in deleted_remote_hosts) + await asyncio.gather(*[self.cleanup_offline_host(h) for h in deleted_remote_hosts]) if new_remote_hosts: logger.info(f"Adding {new_remote_hosts} to websocket broadcast list")