コード例 #1
0
ファイル: test_qconf.py プロジェクト: anan-lee/zyredis
 def test_memleak_get_conf(self):
     """测试get_conf是否有内存泄露
     """
     key = "/test_group/service/codis"
     i = 0
     while i < 1:
         qconf.get_conf(key)
         i = i + 1
コード例 #2
0
ファイル: test_qconf.py プロジェクト: JackHakeem/zyredis
 def test_memleak_get_conf(self):
     """测试get_conf是否有内存泄露
     """
     key = "/test_group/service/codis"
     i = 0
     while i < 1:
         qconf.get_conf(key)
         i = i + 1
コード例 #3
0
ファイル: manager.py プロジェクト: JackHakeem/zyredis
 def _get_qconf_data(self):
     """解决qconf get_batch_conf有内存泄露问题
     """
     qconf_data = {}
     data_keys = qconf.get_batch_keys(self.zk_path)
     for _key in data_keys:
         node_key = "{}/{}".format(self.zk_path, _key)
         qconf_data[_key] = qconf.get_conf(node_key)
     return qconf_data
コード例 #4
0
ファイル: manager.py プロジェクト: anan-lee/zyredis
 def _get_qconf_data(self):
     """解决qconf get_batch_conf有内存泄露问题
     """
     qconf_data = {}
     data_keys = qconf.get_batch_keys(self.zk_path)
     for _key in data_keys:
         node_key = "{}/{}".format(self.zk_path, _key)
         qconf_data[_key] = qconf.get_conf(node_key)
     return qconf_data
コード例 #5
0
ファイル: test_qconf.py プロジェクト: anan-lee/zyredis
 def test_api(self):
     """测试基本api
     """
     key = "/test_group/service/codis"
     value = qconf.get_conf(key)
     keys = qconf.get_batch_keys(key)
     assert isinstance(keys, list)
     children = qconf.get_batch_conf(key)
     assert isinstance(children, dict)
コード例 #6
0
ファイル: test_qconf.py プロジェクト: JackHakeem/zyredis
 def test_api(self):
     """测试基本api
     """
     key = "/test_group/service/codis"
     value = qconf.get_conf(key)
     keys = qconf.get_batch_keys(key)
     assert isinstance(keys, list)
     children = qconf.get_batch_conf(key)
     assert isinstance(children, dict)