|
@@ -769,8 +769,8 @@ class Dataflow_ActivteMQ_extract(Dataflow_extract):
|
|
|
|
|
|
if all_done>0:
|
|
|
_time = time.time()
|
|
|
- extract_json = self.getExtract_json_fromDB(_fingerprint)
|
|
|
- # extract_json = self.getExtract_json_fromRedis(_fingerprint)
|
|
|
+ # extract_json = self.getExtract_json_fromDB(_fingerprint)
|
|
|
+ extract_json = self.getExtract_json_fromRedis(_fingerprint)
|
|
|
log("get json from db takes %.4f"%(time.time()-_time))
|
|
|
# extract_json = None
|
|
|
_docid = int(data["doc_id"])
|
|
@@ -783,7 +783,8 @@ class Dataflow_ActivteMQ_extract(Dataflow_extract):
|
|
|
extract_json = resp.content.decode("utf8")
|
|
|
_extract.setValue(document_extract2_extract_json,extract_json,True)
|
|
|
_time = time.time()
|
|
|
- self.putExtract_json_toDB(_fingerprint,_docid,extract_json)
|
|
|
+ # self.putExtract_json_toDB(_fingerprint,_docid,extract_json)
|
|
|
+ self.putExtract_json_toRedis(_fingerprint,extract_json)
|
|
|
log("get json to db takes %.2f"%(time.time()-_time))
|
|
|
else:
|
|
|
log("%s--%s"%(str(resp.status_code),resp.content.decode("utf8")))
|