回调平台 API 填结果时,加个参数: is_closed,取result为failed的为False,否则为True

This commit is contained in:
mikigo 2024-07-23 16:50:22 +08:00
parent 053b6eafb7
commit f9811b8f17
2 changed files with 5 additions and 2 deletions

View File

@ -128,7 +128,7 @@ OCR_MAX_MATCH_NUMBER = 100
;=============================== IMAGE CONFIG ===================================
;OpenCV服务端地址
OPENCV_SERVER_HOST = 10.8.11.121
OPENCV_SERVER_HOST = 10.8.12.175
;图像识别端口
OPENCV_PORT = 8889

View File

@ -45,6 +45,7 @@ class JsonBackfill:
"case": "",
"task": json_backfill_task_id,
"result": "",
"is_closed": "",
"module": "",
"longrepr": "",
"pm_ip": "",
@ -58,7 +59,9 @@ class JsonBackfill:
if case_id:
tpl["case"] = case_id[0]
tpl["module"] = module
tpl["result"] = value.get("result")
result = value.get("result")
tpl["result"] = result
tpl["is_closed"] = False if result == "fail" else True
tpl["longrepr"] = value.get("longrepr")
tpl["pm_ip"] = _ip
res = self.api.post(