codosdk 1.0.51__tar.gz → 1.0.52__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.51 → codosdk-1.0.52}/PKG-INFO +1 -1
- {codosdk-1.0.51 → codosdk-1.0.52}/codosdk.egg-info/PKG-INFO +1 -1
- {codosdk-1.0.51 → codosdk-1.0.52}/setup.py +1 -1
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/mqhelper.py +2 -1
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/utils/__init__.py +3 -6
- {codosdk-1.0.51 → codosdk-1.0.52}/LICENSE +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/README.md +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/codosdk.egg-info/SOURCES.txt +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/codosdk.egg-info/dependency_links.txt +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/codosdk.egg-info/requires.txt +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/codosdk.egg-info/top_level.txt +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/opssdk/__init__.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/opssdk/utils/__init__.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/pyproject.toml +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/setup.cfg +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/__init__.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/api_set.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/__init__.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/admin_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/agent_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/cmdb_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/kerrigan_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/mgv4_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/notice_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/apis/task_apis.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/application.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/base_handler.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/cache.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/cache_context.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/client.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/cloud/__init__.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/cloud/qcloud_api.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/cloud/ucloud_api.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/cloud_utils.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/configs.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/consts.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/crud_utils.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/db_context.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/error.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/fetch_coroutine.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/jwt_token.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/ldap.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/logger.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/model_utils.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/program.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/salt_api.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/sqlalchemy_pagination.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/tools.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/utils/cc_crypto.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/utils/date_format.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/utils/pydantic_utils.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/websdk2/utils/pydantic_utils_v2.py +0 -0
- {codosdk-1.0.51 → codosdk-1.0.52}/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.52'
|
|
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.')
|
|
@@ -493,6 +493,7 @@ class MessageQueueBase:
|
|
|
493
493
|
channel.stop_consuming()
|
|
494
494
|
except:
|
|
495
495
|
pass
|
|
496
|
+
raise
|
|
496
497
|
finally:
|
|
497
498
|
if channel and hasattr(channel, 'is_open') and channel.is_open:
|
|
498
499
|
try:
|
|
@@ -505,7 +506,7 @@ class MessageQueueBase:
|
|
|
505
506
|
def call_back(self, ch: Any, method: Any, properties: Any, body: bytes) -> None:
|
|
506
507
|
"""默认消息回调处理"""
|
|
507
508
|
try:
|
|
508
|
-
self.logger.info('Received message')
|
|
509
|
+
# self.logger.info('Received message')
|
|
509
510
|
self.on_message(body)
|
|
510
511
|
|
|
511
512
|
if not self._no_ack:
|
|
@@ -279,16 +279,13 @@ def echo_datetime_now_f():
|
|
|
279
279
|
|
|
280
280
|
|
|
281
281
|
def echo_execute_time(func):
|
|
282
|
-
import logging
|
|
283
|
-
from time import time
|
|
284
|
-
|
|
285
282
|
# 定义嵌套函数,用来打印出装饰的函数的执行时间
|
|
286
283
|
def wrapper(*args, **kwargs):
|
|
287
284
|
# 定义开始时间和结束时间,将func夹在中间执行,取得其返回值
|
|
288
|
-
start = time()
|
|
285
|
+
start = time.time()
|
|
289
286
|
func_return = func(*args, **kwargs)
|
|
290
|
-
end = time()
|
|
291
|
-
logging.
|
|
287
|
+
end = time.time()
|
|
288
|
+
logging.info(f'{func.__name__}() execute time: {end - start}s')
|
|
292
289
|
return func_return
|
|
293
290
|
|
|
294
291
|
# 返回嵌套的函数
|
|
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
|