Quellcode durchsuchen

附件接口返回错误码时更新数据

luojiehua vor 2 Jahren
Ursprung
Commit
0ac3e9b489
1 geänderte Dateien mit 6 neuen und 4 gelöschten Zeilen
  1. 6 4
      BaseDataMaintenance/maintenance/dataflow_mq.py

+ 6 - 4
BaseDataMaintenance/maintenance/dataflow_mq.py

@@ -315,11 +315,13 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
                     if len(_html)<5:
                         _html = ""
                 else:
-                    sentMsgToDD("attach interface failed of docid:%s of filemd5:%s of type:%s size:%.3fM with result:%s"%(str(docids),filemd5,_filetype,round(_size/1024/1024,4),str(_html)))
-                    _html = ""
-
+                    if len(_html)>1:
+                        _html = "interface return error"
+                    else:
+                        sentMsgToDD("attach interface failed of docid:%s of filemd5:%s of type:%s size:%.3fM with result:%s"%(str(docids),filemd5,_filetype,round(_size/1024/1024,4),str(_html)))
+                        _html = ""
 
-                    return False
+                        return False
 
                 swf_images = eval(swf_images)
                 if attach.getProperties().get(attachment_filetype)=="swf" and len(swf_images)>0: