codosdk 1.0.48__tar.gz → 1.0.50__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.
- {codosdk-1.0.48 → codosdk-1.0.50}/PKG-INFO +1 -1
- {codosdk-1.0.48 → codosdk-1.0.50}/codosdk.egg-info/PKG-INFO +1 -1
- {codosdk-1.0.48 → codosdk-1.0.50}/setup.py +1 -1
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/mqhelper.py +17 -8
- {codosdk-1.0.48 → codosdk-1.0.50}/LICENSE +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/README.md +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/codosdk.egg-info/SOURCES.txt +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/codosdk.egg-info/dependency_links.txt +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/codosdk.egg-info/requires.txt +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/codosdk.egg-info/top_level.txt +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/opssdk/__init__.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/opssdk/utils/__init__.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/pyproject.toml +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/setup.cfg +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/__init__.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/api_set.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/__init__.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/admin_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/agent_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/cmdb_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/kerrigan_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/mgv4_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/notice_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/apis/task_apis.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/application.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/base_handler.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/cache.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/cache_context.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/client.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/cloud/__init__.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/cloud/qcloud_api.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/cloud/ucloud_api.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/cloud_utils.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/configs.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/consts.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/crud_utils.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/db_context.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/error.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/fetch_coroutine.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/jwt_token.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/ldap.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/logger.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/model_utils.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/program.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/salt_api.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/sqlalchemy_pagination.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/tools.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/utils/__init__.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/utils/cc_crypto.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/utils/date_format.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/utils/pydantic_utils.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/utils/pydantic_utils_v2.py +0 -0
- {codosdk-1.0.48 → codosdk-1.0.50}/websdk2/web_logs.py +0 -0
|
@@ -9,7 +9,7 @@ desc : CODO SDK
|
|
|
9
9
|
import sys
|
|
10
10
|
from setuptools import setup, find_packages
|
|
11
11
|
|
|
12
|
-
VERSION = '1.0.
|
|
12
|
+
VERSION = '1.0.50'
|
|
13
13
|
|
|
14
14
|
if sys.version_info < (2, 7) or (3, 0) <= sys.version_info < (3, 6):
|
|
15
15
|
print('This program requires at least Python 2.7 or 3.6 to run.')
|
|
@@ -16,8 +16,17 @@ from .consts import const
|
|
|
16
16
|
from .configs import configs
|
|
17
17
|
from .error import ConfigError
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
# 配置pika日志级别
|
|
20
|
+
pika_logger = logging.getLogger('pika')
|
|
21
|
+
pika_logger.setLevel(logging.ERROR)
|
|
22
|
+
|
|
23
|
+
# 屏蔽pika诊断日志噪音
|
|
24
|
+
pika_diagnostic_logger = logging.getLogger('pika.diagnostic_utils')
|
|
25
|
+
pika_diagnostic_logger.setLevel(logging.CRITICAL)
|
|
26
|
+
|
|
27
|
+
# 屏蔽pika适配器日志噪音
|
|
28
|
+
pika_adapter_logger = logging.getLogger('pika.adapters')
|
|
29
|
+
pika_adapter_logger.setLevel(logging.CRITICAL)
|
|
21
30
|
|
|
22
31
|
|
|
23
32
|
# class MessageQueueBase(object):
|
|
@@ -160,12 +169,12 @@ class RabbitMQConnectionPool:
|
|
|
160
169
|
port=int(mq_config[const.MQ_PORT]),
|
|
161
170
|
virtual_host=mq_config[const.MQ_VHOST],
|
|
162
171
|
credentials=credentials,
|
|
163
|
-
heartbeat=
|
|
164
|
-
blocked_connection_timeout=
|
|
165
|
-
socket_timeout=
|
|
166
|
-
connection_attempts=
|
|
167
|
-
retry_delay=
|
|
168
|
-
stack_timeout=
|
|
172
|
+
heartbeat=600, # 减少心跳间隔
|
|
173
|
+
blocked_connection_timeout=300, # 减少阻塞超时
|
|
174
|
+
socket_timeout=60, # 添加socket超时
|
|
175
|
+
connection_attempts=2, # 连接重试次数
|
|
176
|
+
retry_delay=2, # 重试延迟
|
|
177
|
+
stack_timeout=60 # 栈超时
|
|
169
178
|
)
|
|
170
179
|
|
|
171
180
|
connection = pika.BlockingConnection(connection_params)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|