|
@@ -226,7 +226,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
|
if objectPath is None:
|
|
|
relative_path = "%s/%s"%(_uuid.hex[:4],_uuid.hex)
|
|
|
else:
|
|
|
- relative_path = objectPath[5:]
|
|
|
+ relative_path = objectPath[5:].replace("//","/")
|
|
|
localpath = "/FileInfo/%s"%(relative_path)
|
|
|
if not os.path.exists(localpath):
|
|
|
if not os.path.exists(os.path.dirname(localpath)):
|
|
@@ -437,7 +437,16 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
|
if _filemd5 not in set_md5:
|
|
|
list_not_in_md5.append(_filemd5)
|
|
|
_path = self.getAttachPath(_filemd5,_dochtmlcon)
|
|
|
- if _path is not None:
|
|
|
+
|
|
|
+
|
|
|
+ log("getAttachments search in ots:%s"%(_filemd5))
|
|
|
+ _attach = {attachment_filemd5:_filemd5}
|
|
|
+ _attach_ots = attachment(_attach)
|
|
|
+ if _attach_ots.fix_columns(self.ots_client,[attachment_status,attachment_path,attachment_attachmenthtml,attachment_attachmentcon,attachment_filetype,attachment_swfUrls,attachment_process_time],True):
|
|
|
+ if _attach_ots.getProperties().get(attachment_status) is not None:
|
|
|
+ log("getAttachments find in ots:%s"%(_filemd5))
|
|
|
+ list_attachment.append(Attachment_postgres(_attach_ots.getProperties()))
|
|
|
+ else:
|
|
|
if _path[0]=="/":
|
|
|
_path = _path[1:]
|
|
|
_filetype = _path.split(".")[-1]
|
|
@@ -447,14 +456,9 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
|
attachment_path:"%s/%s"%(_filemd5[:4],_path),
|
|
|
attachment_crtime:getCurrent_date(format="%Y-%m-%d %H:%M:%S")}
|
|
|
list_attachment.append(Attachment_postgres(_attach))
|
|
|
- else:
|
|
|
- log("getAttachments search in ots:%s"%(_filemd5))
|
|
|
- _attach = {attachment_filemd5:_filemd5}
|
|
|
- _attach_ots = attachment(_attach)
|
|
|
- _attach_ots.fix_columns(self.ots_client,[attachment_status,attachment_path,attachment_attachmenthtml,attachment_attachmentcon,attachment_filetype,attachment_swfUrls,attachment_process_time],True)
|
|
|
- if _attach_ots.getProperties().get(attachment_status) is not None:
|
|
|
- log("getAttachments find in ots:%s"%(_filemd5))
|
|
|
- list_attachment.append(Attachment_postgres(_attach_ots.getProperties()))
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
return list_attachment
|
|
|
except Exception as e:
|