fix
This commit is contained in:
@@ -219,6 +219,13 @@ class AIDetailDataAPI(APIView):
|
|||||||
end = request.GET.get("end")
|
end = request.GET.get("end")
|
||||||
username = request.GET.get("username")
|
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
|
user = request.user
|
||||||
if username and request.user.is_super_admin():
|
if username and request.user.is_super_admin():
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import dramatiq
|
import dramatiq
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
@@ -96,6 +99,7 @@ def evaluate_flowchart_task(submission_id):
|
|||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.exception("evaluate_flowchart_task failed for submission %s", submission_id)
|
||||||
if submission is not None:
|
if submission is not None:
|
||||||
submission.status = FlowchartSubmissionStatus.FAILED
|
submission.status = FlowchartSubmissionStatus.FAILED
|
||||||
submission.save()
|
submission.save()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ REDIS_CONF = {
|
|||||||
"port": get_env("REDIS_PORT", "6379"),
|
"port": get_env("REDIS_PORT", "6379"),
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["*"]
|
ALLOWED_HOSTS = ["*"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user