From 809580c9cc5b672b06eca57c736fda927ee43a22 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 17 Nov 2023 11:33:53 +1100 Subject: [PATCH] fix: Fix get links count cache --- db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db.py b/db.py index 0b045f8..0d3b8fb 100644 --- a/db.py +++ b/db.py @@ -45,6 +45,7 @@ def check_tables(): def get_link_count(): global last_check_link + global links if time.time() - last_check_link < 60: return links @@ -58,8 +59,8 @@ def get_link_count(): last_check_link = time.time() if result == None: return 0 - - return result[0] + links = result[0] + return links def get_account_count(): global last_check_account