aboutsummaryrefslogtreecommitdiffstats
path: root/backend/decorators.py
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2023-11-17 13:24:42 -0800
committerPinapelz <yukais@pinapelz.com>2023-11-17 13:24:42 -0800
commit96019367e8f72eac26abd3b7a908c2b914bd1ae1 (patch)
treefa7dbe66ea8b12bde0970dc8db27f7601464b3b8 /backend/decorators.py
parentc159e86a3487dbae79de8d0887f288625084bfcd (diff)
v2: add initial Next JS files, remove static templates
Diffstat (limited to 'backend/decorators.py')
-rw-r--r--backend/decorators.py16
1 files changed, 16 insertions, 0 deletions
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage