funboost 47.6__py3-none-any.whl → 47.7__py3-none-any.whl

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.

Potentially problematic release.


This version of funboost might be problematic. Click here for more details.

funboost/__init__.py CHANGED
@@ -13,7 +13,7 @@ set_frame_config这个模块的 use_config_form_funboost_config_module() 是核
13
13
  这段注释说明和使用的用户无关,只和框架开发人员有关.
14
14
  '''
15
15
 
16
- __version__ = "47.6"
16
+ __version__ = "47.7"
17
17
 
18
18
  from funboost.set_frame_config import show_frame_config
19
19
 
@@ -64,7 +64,8 @@ from funboost.concurrent_pool.async_pool_executor import AsyncPoolExecutor
64
64
  from funboost.concurrent_pool.bounded_threadpoolexcutor import \
65
65
  BoundedThreadPoolExecutor
66
66
  from funboost.utils.redis_manager import RedisMixin
67
- from func_timeout import func_set_timeout # noqa
67
+ # from func_timeout import func_set_timeout # noqa
68
+ from funboost.utils.func_timeout.dafunc import func_set_timeout
68
69
 
69
70
  from funboost.concurrent_pool.custom_threadpool_executor import check_not_monkey
70
71
  from funboost.concurrent_pool.flexible_thread_pool import FlexibleThreadPool, sync_or_async_fun_deco
@@ -205,7 +205,14 @@ class BoosterParams(BaseJsonAbleModel):
205
205
 
206
206
  # func_params_is_pydantic_model: bool = False # funboost 兼容支持 函数娼还是 pydantic model类型,funboost在发布之前和取出来时候自己转化。
207
207
 
208
- consuming_function_kind: typing.Optional[str] = None # 自动生成的信息,不需要用户主动传参,如果自动判断失误就传递。是判断消费函数是函数还是实例方法还是类方法
208
+ consuming_function_kind: typing.Optional[str] = None # 自动生成的信息,不需要用户主动传参,如果自动判断失误就传递。是判断消费函数是函数还是实例方法还是类方法。如果传递了,就不自动获取函数类型。
209
+ ''' consuming_function_kind 可以为以下类型,
210
+ class FunctionKind:
211
+ CLASS_METHOD = 'CLASS_METHOD'
212
+ INSTANCE_METHOD = 'INSTANCE_METHOD'
213
+ STATIC_METHOD = 'STATIC_METHOD'
214
+ COMMON_FUNCTION = 'COMMON_FUNCTION'
215
+ '''
209
216
 
210
217
  auto_generate_info: dict = {} # 自动生成的信息,不需要用户主动传参.
211
218
 
@@ -14,17 +14,17 @@ from funboost.constant import FunctionKind
14
14
  class ClsHelper:
15
15
  @staticmethod
16
16
  def get_instncae_method_cls(instncae_method):
17
- print(instncae_method)
18
- print(instncae_method.__qualname__)
19
- print(instncae_method.__module__)
17
+ # print(instncae_method)
18
+ # print(instncae_method.__qualname__)
19
+ # print(instncae_method.__module__)
20
20
  return getattr(sys.modules[instncae_method.__module__],instncae_method.__qualname__.split('.')[0])
21
21
  # return instncae_method.__self__.__class__
22
22
 
23
23
  @staticmethod
24
24
  def get_classs_method_cls(class_method):
25
- print(class_method)
26
- print(class_method.__qualname__)
27
- print(class_method.__module__)
25
+ # print(class_method)
26
+ # print(class_method.__qualname__)
27
+ # print(class_method.__module__)
28
28
  return getattr(sys.modules[class_method.__module__],class_method.__qualname__.split('.')[0])
29
29
 
30
30
  @staticmethod
@@ -16,3 +16,10 @@ from funboost.utils.dependency_packages_in_pythonpath import add_to_pythonpath #
16
16
 
17
17
  这样导入时候就能自动补全提示和跳转到这里的包。
18
18
 
19
+
20
+
21
+
22
+
23
+ ## 3 现在这个里面的东西已经废弃了,funboost不再使用这里面的东西。
24
+
25
+
@@ -7,7 +7,7 @@ import redis5
7
7
  from funboost.funboost_config_deafult import BrokerConnConfig
8
8
  from funboost.utils import decorators
9
9
 
10
- from aioredis.client import Redis as AioRedis
10
+ # from aioredis.client import Redis as AioRedis
11
11
 
12
12
 
13
13
 
@@ -40,21 +40,21 @@ class RedisManager(object):
40
40
  return self.redis
41
41
 
42
42
 
43
- class AioRedisManager(object):
44
- _redis_db__conn_map = {}
45
-
46
- def __init__(self, host='127.0.0.1', port=6379, db=0, username='', password=''):
47
- self._key = (host, port, db, username, password,)
48
- if self._key not in self.__class__._redis_db__conn_map:
49
- self.__class__._redis_db__conn_map[self._key] = AioRedis(host=host, port=port, db=db, username=username,
50
- password=password, max_connections=1000, decode_responses=True)
51
- self.redis = self.__class__._redis_db__conn_map[self._key]
52
-
53
- def get_redis(self) -> AioRedis:
54
- """
55
- :rtype :redis5.Redis
56
- """
57
- return self.redis
43
+ # class AioRedisManager(object):
44
+ # _redis_db__conn_map = {}
45
+ #
46
+ # def __init__(self, host='127.0.0.1', port=6379, db=0, username='', password=''):
47
+ # self._key = (host, port, db, username, password,)
48
+ # if self._key not in self.__class__._redis_db__conn_map:
49
+ # self.__class__._redis_db__conn_map[self._key] = AioRedis(host=host, port=port, db=db, username=username,
50
+ # password=password, max_connections=1000, decode_responses=True)
51
+ # self.redis = self.__class__._redis_db__conn_map[self._key]
52
+ #
53
+ # def get_redis(self) -> AioRedis:
54
+ # """
55
+ # :rtype :redis5.Redis
56
+ # """
57
+ # return self.redis
58
58
 
59
59
 
60
60
  # noinspection PyArgumentEqualDefault