fix: Fix get links count cache
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s

This commit is contained in:
Nathan Woodburn 2023-11-17 11:33:53 +11:00
parent 1493c545bb
commit 809580c9cc
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

5
db.py
View File

@ -45,6 +45,7 @@ def check_tables():
def get_link_count(): def get_link_count():
global last_check_link global last_check_link
global links
if time.time() - last_check_link < 60: if time.time() - last_check_link < 60:
return links return links
@ -58,8 +59,8 @@ def get_link_count():
last_check_link = time.time() last_check_link = time.time()
if result == None: if result == None:
return 0 return 0
links = result[0]
return result[0] return links
def get_account_count(): def get_account_count():
global last_check_account global last_check_account