fix: Fix get links count cache
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s
All checks were successful
Build Docker / Build Main Image (push) Successful in 19s
This commit is contained in:
parent
1493c545bb
commit
809580c9cc
5
db.py
5
db.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user