Ver código fonte

消息队列分级并设置动态消费者

luojiehua 2 dias atrás
pai
commit
e2b40918b4
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      BaseDataMaintenance/maintenance/dataflow_mq.py

+ 3 - 3
BaseDataMaintenance/maintenance/dataflow_mq.py

@@ -416,7 +416,7 @@ class Dataflow_ActivteMQ_attachment(Dataflow_attachment):
 
                     page_time = item.get(document_page_time,"")
                     current_date = getCurrent_date(format='%Y-%m-%d')
-                    last_7_date = timeAdd(current_date,7,format='%Y-%m-%d')
+                    last_7_date = timeAdd(current_date,-7,format='%Y-%m-%d')
                     if page_time<last_7_date:
                         is_his = True
                     else:
@@ -2076,7 +2076,7 @@ class Dataflow_init(Dataflow):
                 page_attachments = body.get(document_tmp_attachment_path,"[]")
                 _uuid = body.get(document_tmp_uuid,"")
                 current_date = getCurrent_date(format='%Y-%m-%d')
-                last_7_date = timeAdd(current_date,7,format='%Y-%m-%d')
+                last_7_date = timeAdd(current_date,-7,format='%Y-%m-%d')
                 page_time = body.get(document_page_time,"")
                 if page_time<last_7_date:
                     is_his = True
@@ -2219,7 +2219,7 @@ class Dataflow_init(Dataflow):
                                 ots_dict["partitionkey"] = ots_dict["docid"]%500+1
 
                             current_date = getCurrent_date(format='%Y-%m-%d')
-                            last_7_date = timeAdd(current_date,7,format='%Y-%m-%d')
+                            last_7_date = timeAdd(current_date,-7,format='%Y-%m-%d')
                             page_time = ots_dict.get(document_page_time,"")
                             if page_time<last_7_date:
                                 is_his = True