Files
ReinLoopTest/ReinLoop/tool/submit_identification_feedback.py
T
2026-07-30 11:12:31 +08:00

27 lines
990 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""已迁移至 ControlPanel 的辨识反馈管理能力。"""
import argparse
def submit_feedback(customer: str, result: int, run_id=None, timeout=20):
raise RuntimeError("辨识反馈已迁移至 ControlPanel,客户端不提供管理接口")
def main():
parser = argparse.ArgumentParser(description="提交辨识结果 0/1")
parser.add_argument("customer", help="许可证中的客户名称")
parser.add_argument("result", type=int, choices=(0, 1), help="1=通过,0=未通过")
parser.add_argument("--run-id", help="可选:限定当前辨识 CSV 文件名")
args = parser.parse_args()
try:
data = submit_feedback(args.customer, args.result, args.run_id)
except Exception as exc:
print(f"提交失败: {exc}")
return 1
state = "已通过" if data["result"] == 1 else "未通过"
print(f"提交成功:{state}runId={data.get('runId', '')}")
return 0
if __name__ == "__main__":
raise SystemExit(main())