Automated update of Base Application package.
This commit is contained in:
parent
626b090d23
commit
7e45775c2c
BIN
dist/app-1.0.0-py3-none-any.whl
vendored
BIN
dist/app-1.0.0-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/app-1.0.0.tar.gz
vendored
BIN
dist/app-1.0.0.tar.gz
vendored
Binary file not shown.
@ -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
|
||||
|
@ -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...")
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user