|
@@ -221,7 +221,6 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
|
_path = attach.getProperties().get(attachment_path)
|
|
|
_uuid = uuid4()
|
|
|
objectPath = attach.getProperties().get(attachment_path)
|
|
|
- objectPath = str(objectPath).replace("//","/")
|
|
|
docids = attach.getProperties().get(attachment_docids)
|
|
|
|
|
|
if objectPath is None:
|
|
@@ -252,7 +251,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
|
if not (local_exists or download_succeed):
|
|
|
_ots_attach = attachment(attach.getProperties_ots())
|
|
|
_ots_exists = _ots_attach.fix_columns(self.ots_client,[attachment_attachmenthtml,attachment_classification,attachment_attachmentcon,attachment_path,attachment_status,attachment_filetype],True)
|
|
|
- log("md5:%s path:%s file not in local or oss,search ots.attachment"%(filemd5,objectPath[5:]))
|
|
|
+ log("md5:%s path:%s file not in local or oss,search ots.attachment"%(filemd5,objectPath))
|
|
|
if _ots_attach.getProperties().get(attachment_attachmenthtml,"")!="" and str(_ots_attach.getProperties().get(attachment_status))!=str(ATTACHMENT_INIT):
|
|
|
attach.setValue(attachment_attachmenthtml,_ots_attach.getProperties().get(attachment_attachmenthtml,""))
|
|
|
attach.setValue(attachment_attachmentcon,_ots_attach.getProperties().get(attachment_attachmentcon,""))
|
|
@@ -274,11 +273,11 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
|
objectPath = attach.getProperties().get(attachment_path)
|
|
|
download_succeed = downloadFile(self.bucket,objectPath,localpath)
|
|
|
if download_succeed:
|
|
|
- log("md5:%s path:%s download file from oss succeed"%(filemd5,objectPath[5:]))
|
|
|
+ log("md5:%s path:%s download file from oss succeed"%(filemd5,objectPath))
|
|
|
else:
|
|
|
- log("md5:%s path:%s download file from ots failed=="%(filemd5,objectPath[5:]))
|
|
|
+ log("md5:%s path:%s download file from ots failed=="%(filemd5,objectPath))
|
|
|
else:
|
|
|
- log("md5:%s path:%s not found in ots"%(filemd5,objectPath[5:]))
|
|
|
+ log("md5:%s path:%s not found in ots"%(filemd5,objectPath))
|
|
|
if local_exists or download_succeed:
|
|
|
_size = os.path.getsize(localpath)
|
|
|
attach.setValue(attachment_size,_size,True)
|