Browse Source

修改启动时消费者报没有属性的问题

luojiehua 2 năm trước cách đây
mục cha
commit
fe25fcd64f
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      BaseDataMaintenance/maintenance/dataflow_mq.py

+ 5 - 5
BaseDataMaintenance/maintenance/dataflow_mq.py

@@ -571,7 +571,10 @@ class Dataflow_ActivteMQ_extract(Dataflow_extract):
             current_weight += self.extract_interfaces[_i][1]
             self.extract_interfaces[_i][1] = current_weight/self.whole_weight
 
-
+        self.pool_postgres = ConnectorPool(10,self.comsumer_count,getConnection_postgres)
+        self.pool_redis_doc = ConnectorPool(10,self.comsumer_count,getConnect_redis_doc)
+        self.conn_mq = getConnect_activateMQ()
+        self.pool_mq = ConnectorPool(10,30,getConnect_activateMQ)
         self.block_url = RLock()
         self.url_count = 0
 
@@ -582,10 +585,7 @@ class Dataflow_ActivteMQ_extract(Dataflow_extract):
             createComsumer(listener_extract,self.mq_extract)
             self.list_extract_comsumer.append(listener_extract)
 
-        self.pool_postgres = ConnectorPool(10,self.comsumer_count,getConnection_postgres)
-        self.pool_redis_doc = ConnectorPool(10,self.comsumer_count,getConnect_redis_doc)
-        self.conn_mq = getConnect_activateMQ()
-        self.pool_mq = ConnectorPool(10,30,getConnect_activateMQ)
+
 
 
     def monitor_listener(self):