You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1KB

  1. def message_feedback(requestId, status, type, error_code="", error_msg="", progress="", original_url="", sign_url="",
  2. modelCode="", detectTargetCode="", analyse_time="", analyse_results=""):
  3. taskfb = {}
  4. results = []
  5. result_msg = {}
  6. taskfb["request_id"] = requestId
  7. taskfb["status"] = status
  8. taskfb["type"] = type
  9. taskfb["error_code"] = error_code
  10. taskfb["error_msg"] = error_msg
  11. taskfb["progress"] = progress
  12. result_msg["original_url"] = original_url
  13. result_msg["sign_url"] = sign_url
  14. result_msg["analyse_results"] = analyse_results
  15. result_msg["model_code"] = modelCode
  16. result_msg["detect_targets_code"] = detectTargetCode
  17. result_msg["analyse_time"] = analyse_time
  18. results.append(result_msg)
  19. taskfb["results"] = results
  20. return taskfb
  21. def recording_feedback(requestId, status, error_code="", error_msg="", recording_video_url=""):
  22. rdfb = {}
  23. rdfb["request_id"] = requestId
  24. rdfb["status"] = status
  25. rdfb["error_code"] = error_code
  26. rdfb["error_msg"] = error_msg
  27. rdfb["recording_video_url"] = recording_video_url
  28. return rdfb