gjdatac-api 0.2.6__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gjdatac_api
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: 数据接口打包
5
5
  Author: yin
6
6
  Author-email: 2018209921@qq.com
@@ -24,7 +24,7 @@ from .instrument_class import Instrument
24
24
 
25
25
  class GJDataC:
26
26
 
27
- def __init__(self, host, port, user_id, password):
27
+ def __init__(self, host, port, user_id, password, dolphindb_service):
28
28
  """
29
29
  用于定义一些不同接口所需的变量以及一些初始化操作
30
30
  :param host: 数据库地址
@@ -56,11 +56,12 @@ class GJDataC:
56
56
  # 连接数据库
57
57
  db_session = ddb.session()
58
58
  # 原始方式
59
- # success = db_session.connect(self.host, self.port, self.user_id, self.password)
60
-
61
- # 创建连接;开启高可用,并指定sites为所有可用节点的ip:port
62
- success = db_session.connect(self.host, self.port, self.user_id, self.password, highAvailability=True,
63
- highAvailabilitySites=self.sites)
59
+ if not self.sites:
60
+ success = db_session.connect(self.host, self.port, self.user_id, self.password)
61
+ else:
62
+ # 创建连接;开启高可用,并指定sites为所有可用节点的ip:port
63
+ success = db_session.connect(self.host, self.port, self.user_id, self.password, highAvailability=True,
64
+ highAvailabilitySites=self.sites)
64
65
  if not success:
65
66
  raise Exception("please check your database connection information")
66
67
 
@@ -146,6 +146,3 @@ inventory_db_table_name = "qc_product_inventory" # 表名
146
146
  subscribe_min_db_table_name = "QcMinKlineTable" # 表名
147
147
 
148
148
 
149
-
150
- ''' 仿真服务器 '''
151
- dolphindb_service = ["10.74.56.101:8902", "10.74.56.102:8902", "10.74.56.103:8902", "10.74.56.104 8902"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gjdatac-api
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: 数据接口打包
5
5
  Author: yin
6
6
  Author-email: 2018209921@qq.com
@@ -5,7 +5,7 @@ with open('description_info.md', 'r', encoding='utf-8') as f:
5
5
 
6
6
  setup(
7
7
  name='gjdatac_api', # 你的包名
8
- version='0.2.6', # 版本号
8
+ version='0.2.7', # 版本号
9
9
  description='数据接口打包', # 包的简要描述
10
10
  long_description=long_description, # 包的详细描述
11
11
  long_description_content_type='text/markdown', # 描述文件的类型
File without changes