From 96019367e8f72eac26abd3b7a908c2b914bd1ae1 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 17 Nov 2023 13:24:42 -0800 Subject: v2: add initial Next JS files, remove static templates --- backend/decorators.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 backend/decorators.py (limited to 'backend/decorators.py') diff --git a/backend/decorators.py b/backend/decorators.py new file mode 100644 index 0000000..bc0b420 --- /dev/null +++ b/backend/decorators.py @@ -0,0 +1,16 @@ +import time + + +def log(message: str): + def decorator(func): + def wrapper(*args, **kwargs): + print("TASK: " + message) + start = time.time() + result = func(*args, **kwargs) + end = time.time() + print(f"COMPLETE: {message} {round(end - start, 3)} seconds") + return result + + return wrapper + + return decorator -- cgit v1.2.3