From c2773351afde35166abb6089c8590be9894a6a9f Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Mon, 20 Feb 2023 14:06:26 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E8=A7=A3=E5=86=B3=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=90=8E=E7=B3=BB=E7=BB=9F=E6=89=A7=E8=A1=8C?= =?UTF-8?q?Ping=E5=8F=8AGather=E4=BB=BB=E5=8A=A1=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/signal_handlers/asset.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/assets/signal_handlers/asset.py b/apps/assets/signal_handlers/asset.py index 25c54bb8e..107be4422 100644 --- a/apps/assets/signal_handlers/asset.py +++ b/apps/assets/signal_handlers/asset.py @@ -24,7 +24,8 @@ def on_node_pre_save(sender, instance: Node, **kwargs): @merge_delay_run(ttl=5, key=key_by_org) def test_assets_connectivity_handler(assets=()): task_name = gettext_noop("Test assets connectivity ") - test_assets_connectivity_task.delay(assets, str(current_org.id), task_name) + asset_ids = [a.id for a in assets] + test_assets_connectivity_task.delay(asset_ids, str(current_org.id), task_name) @merge_delay_run(ttl=5, key=key_by_org) @@ -33,7 +34,8 @@ def gather_assets_facts_handler(assets=()): logger.info("No assets to update hardware info") return name = gettext_noop("Gather asset hardware info") - gather_assets_facts_task.delay(assets, str(current_org.id), task_name=name) + asset_ids = [a.id for a in assets] + gather_assets_facts_task.delay(asset_ids, str(current_org.id), task_name=name) @merge_delay_run(ttl=5, key=key_by_org)