Automated update of Base Application package.

This commit is contained in:
bot
2025-01-24 15:05:29 +00:00
parent 39fc10b796
commit 8e60d8f75e
3 changed files with 10 additions and 3 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+10 -3
View File
@@ -25,9 +25,10 @@
# SOFTWARE.
import json
import time
from functools import wraps
import json
def time_cache(timeout: int = 600):
def decorator(func):
@@ -35,7 +36,10 @@ def time_cache(timeout: int = 600):
@wraps(func)
def wrapper(*args, **kwargs):
key = (json.dumps(args,default=str), json.dumps(frozenset(kwargs.items()),default=str))
key = (
json.dumps(args, default=str),
json.dumps(frozenset(kwargs.items()), default=str),
)
current_time = time.time()
if key in cache:
@@ -58,7 +62,10 @@ def time_cache_async(timeout: int = 600):
@wraps(func)
async def wrapper(*args, **kwargs):
key = (json.dumps(args,default=str), json.dumps(frozenset(kwargs.items()),default=str))
key = (
json.dumps(args, default=str),
json.dumps(frozenset(kwargs.items()), default=str),
)
current_time = time.time()
if key in cache: