This commit is contained in:
xuyue committed 2026-05-09 01:38:24 -06:00
1 parent 0b01934180
commit 97a9269e2a
3 files changed
+12 -1

No files matched your search

+7
View File
@@ -219,6 +219,13 @@ class AIDetailDataAPI(APIView):
end = request.GET.get("end")
username = request.GET.get("username")
if not start or not end:
return self.error("参数 start 和 end 不能为空")
if not parse_datetime(start):
return self.error("start 格式无效,请使用 ISO 8601 格式")
if not parse_datetime(end):
return self.error("end 格式无效,请使用 ISO 8601 格式")
user = request.user
if username and request.user.is_super_admin():
try:
+4
View File
@@ -1,7 +1,10 @@
import json
import logging
import time
import dramatiq
logger = logging.getLogger(__name__)
from django.db import transaction
from django.utils import timezone
@@ -96,6 +99,7 @@ def evaluate_flowchart_task(submission_id):
)
except Exception as e:
logger.exception("evaluate_flowchart_task failed for submission %s", submission_id)
if submission is not None:
submission.status = FlowchartSubmissionStatus.FAILED
submission.save()
+1 -1
View File
@@ -16,7 +16,7 @@ REDIS_CONF = {
"port": get_env("REDIS_PORT", "6379"),
}
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = ["*"]