adding queue limit
Browse files- src/submission/submit.py +5 -0
src/submission/submit.py
CHANGED
@@ -132,8 +132,13 @@ def add_new_eval(
|
|
132 |
with open(queue_file, "r") as f:
|
133 |
queue_data = json.load(f)
|
134 |
|
|
|
|
|
|
|
135 |
if len(queue_data) == 0:
|
136 |
queue_data = []
|
|
|
|
|
137 |
|
138 |
queue_data.append(eval_entry)
|
139 |
|
|
|
132 |
with open(queue_file, "r") as f:
|
133 |
queue_data = json.load(f)
|
134 |
|
135 |
+
queue_len = len(queue_data)
|
136 |
+
|
137 |
+
|
138 |
if len(queue_data) == 0:
|
139 |
queue_data = []
|
140 |
+
elif queue_len >= 2:
|
141 |
+
return styled_warning("The evaluation queue is full atm. Please try again in one hour")
|
142 |
|
143 |
queue_data.append(eval_entry)
|
144 |
|