From eb1d28577247f7bc6bba6f68bebbc28a2d3650b3 Mon Sep 17 00:00:00 2001 From: Marigold Date: Mon, 11 Nov 2024 11:33:44 +0100 Subject: [PATCH] wip --- apps/wizard/utils/cached.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wizard/utils/cached.py b/apps/wizard/utils/cached.py index af657fd51d0..5ba7ed994d5 100644 --- a/apps/wizard/utils/cached.py +++ b/apps/wizard/utils/cached.py @@ -173,6 +173,7 @@ def load_latest_population(): @st.cache_data def get_tailscale_ip_to_user_map(): + """Get the mapping of Tailscale IPs to user display names.""" proc = subprocess.run(["tailscale", "status", "--json"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) if proc.returncode != 0: @@ -201,6 +202,7 @@ def get_tailscale_ip_to_user_map(): @st.cache_data def get_grapher_user_id(user_ip: str) -> Optional[int]: + """Get the Grapher user ID associated with the given Tailscale IP address.""" # Get Tailscale IP-to-User mapping ip_to_user_map = get_tailscale_ip_to_user_map()