From 68ad9955a1cf5dc7bf2ac9ac4a4ed47f5b6d54e3 Mon Sep 17 00:00:00 2001 From: Tyler Ward Date: Sun, 14 Jul 2024 17:41:34 +0100 Subject: [PATCH 1/2] Remove device images from queries Removes device images from queries as these are not used and causes issues with netbox 4 --- kmicms/integrations/netbox/queries.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kmicms/integrations/netbox/queries.py b/kmicms/integrations/netbox/queries.py index acd1173..1ac13a0 100644 --- a/kmicms/integrations/netbox/queries.py +++ b/kmicms/integrations/netbox/queries.py @@ -25,8 +25,6 @@ manufacturer { name } - front_image - rear_image } tags { name @@ -72,8 +70,6 @@ manufacturer { name } - front_image - rear_image } tags { name From 5b6677c5eef19f59e9f7761c21dc2b469c0d912c Mon Sep 17 00:00:00 2001 From: Tyler Ward Date: Sun, 14 Jul 2024 17:50:13 +0100 Subject: [PATCH 2/2] Update netbox timeout --- kmicms/kmicms/configuration.prod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmicms/kmicms/configuration.prod.py b/kmicms/kmicms/configuration.prod.py index 25ab415..dc465b1 100644 --- a/kmicms/kmicms/configuration.prod.py +++ b/kmicms/kmicms/configuration.prod.py @@ -46,5 +46,5 @@ NETBOX_GRAPHQL_ENDPOINT = "https://netbox.sown.org.uk/graphql/" NETBOX_API_TOKEN = os.environ.get("NETBOX_API_TOKEN") -NETBOX_REQUEST_TIMEOUT = 0.5 +NETBOX_REQUEST_TIMEOUT = 5.0 NETBOX_CACHE_TTL = 300