Automated update of Base Application package.

This commit is contained in:
bot 2024-12-21 11:30:52 +00:00
parent 626b090d23
commit 7e45775c2c
5 changed files with 13 additions and 4 deletions

Binary file not shown.

BIN
dist/app-1.0.0.tar.gz vendored

Binary file not shown.

View File

@ -5,8 +5,10 @@ src/app/__main__.py
src/app/agent.py
src/app/app.py
src/app/args.py
src/app/cache.py
src/app/cli.py
src/app/kim.py
src/app/queue.py
src/app/repl.py
src/app/rpc.py
src/app/server.py

View File

@ -25,10 +25,11 @@
# SOFTWARE.
import time
import asyncio
import time
from functools import wraps
def time_cache(timeout: int = 600):
def decorator(func):
cache = {}
@ -48,8 +49,10 @@ def time_cache(timeout: int = 600):
return result
return wrapper
return decorator
def time_cache_async(timeout: int = 600):
def decorator(func):
cache = {}
@ -69,8 +72,10 @@ def time_cache_async(timeout: int = 600):
return result
return wrapper
return decorator
@cache_time_async(timeout=600)
async def expensive_async_calculation(x, y):
print("Computing...")

View File

@ -13,9 +13,10 @@
# Copies or substantial portions of the Software are reproduced and must include the above copyright notice and other similar permission notice in this particular software, including in any accompanying documentation.
from functools import wraps
from collections import deque
import asyncio
from collections import deque
from functools import wraps
class CallQueue:
def __init__(self):
@ -25,6 +26,7 @@ class CallQueue:
@wraps(func)
def wrapper(*args, **kwargs):
self.call_queue.append((func, args, kwargs))
return wrapper
async def execute_next(self):