|
@@ -349,7 +349,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
# attach.update_row(self.attach_pool)
|
|
# attach.update_row(self.attach_pool)
|
|
# else:
|
|
# else:
|
|
# attach.insert_row(self.attach_pool)
|
|
# attach.insert_row(self.attach_pool)
|
|
- self.putAttach_json_toRedis(filemd5,json.dumps(attach.getProperties()))
|
|
|
|
|
|
+ self.putAttach_json_toRedis(filemd5,attach.getProperties())
|
|
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
@@ -382,7 +382,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
# attach.update_row(self.attach_pool)
|
|
# attach.update_row(self.attach_pool)
|
|
# else:
|
|
# else:
|
|
# attach.insert_row(self.attach_pool)
|
|
# attach.insert_row(self.attach_pool)
|
|
- self.putAttach_json_toRedis(filemd5,json.dumps(attach.getProperties()))
|
|
|
|
|
|
+ self.putAttach_json_toRedis(filemd5,attach.getProperties())
|
|
|
|
|
|
|
|
|
|
if local_exists:
|
|
if local_exists:
|
|
@@ -462,7 +462,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
# attach.update_row(self.attach_pool)
|
|
# attach.update_row(self.attach_pool)
|
|
# else:
|
|
# else:
|
|
# attach.insert_row(self.attach_pool)
|
|
# attach.insert_row(self.attach_pool)
|
|
- self.putAttach_json_toRedis(filemd5,json.dumps(attach.getProperties()))
|
|
|
|
|
|
+ self.putAttach_json_toRedis(filemd5,attach.getProperties())
|
|
|
|
|
|
|
|
|
|
if local_exists:
|
|
if local_exists:
|
|
@@ -525,12 +525,16 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
|
|
pass
|
|
pass
|
|
return None
|
|
return None
|
|
|
|
|
|
- def putAttach_json_toRedis(self,filemd5,extract_json):
|
|
|
|
|
|
+ def putAttach_json_toRedis(self,filemd5,extract_dict):
|
|
|
|
|
|
db = self.redis_pool.getConnector()
|
|
db = self.redis_pool.getConnector()
|
|
try:
|
|
try:
|
|
|
|
+ new_dict = {}
|
|
|
|
+ for k,v in extract_dict.items():
|
|
|
|
+ if not isinstance(v,set):
|
|
|
|
+ new_dict[k] = v
|
|
_key = "attach-%s"%(filemd5)
|
|
_key = "attach-%s"%(filemd5)
|
|
- _extract_json = db.set(str(_key),extract_json)
|
|
|
|
|
|
+ _extract_json = db.set(str(_key),json.dumps(new_dict))
|
|
db.expire(_key,3600*3)
|
|
db.expire(_key,3600*3)
|
|
return _extract_json
|
|
return _extract_json
|
|
except Exception as e:
|
|
except Exception as e:
|