funboost 19.5__py3-none-any.whl → 19.6__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 +0 -1
- funboost/consumers/base_consumer.py +4 -6
- funboost/utils/dependency_packages_in_pythonpath/__pycache__/add_to_pythonpath.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/__pycache__/add_to_pythonpath.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/add_to_pythonpath.py +1 -1
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__init__.py +59 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/__init__.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/__init__.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/client.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/client.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/compat.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/compat.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/lock.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/lock.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/utils.cpython-311.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/utils.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/client.py +4804 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/compat.py +8 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/connection.py +1668 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/exceptions.py +96 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/lock.py +306 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/log.py +15 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/py.typed +0 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/readme.md +20 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/sentinel.py +329 -0
- funboost/utils/dependency_packages_in_pythonpath/aioredis/utils.py +61 -0
- funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/StoppableThread.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/__init__.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/dafunc.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/exceptions.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/py3_raise.cpython-37.pyc +0 -0
- funboost/utils/dependency_packages_in_pythonpath/readme.md +14 -0
- funboost/utils/redis_manager.py +1 -1
- {funboost-19.5.dist-info → funboost-19.6.dist-info}/METADATA +424 -423
- {funboost-19.5.dist-info → funboost-19.6.dist-info}/RECORD +42 -11
- {funboost-19.5.dist-info → funboost-19.6.dist-info}/WHEEL +5 -5
- {funboost-19.5.dist-info → funboost-19.6.dist-info}/LICENSE +0 -0
- {funboost-19.5.dist-info → funboost-19.6.dist-info}/top_level.txt +0 -0
funboost/__init__.py
CHANGED
|
@@ -52,7 +52,7 @@ from funboost.concurrent_pool.async_pool_executor import AsyncPoolExecutor
|
|
|
52
52
|
# noinspection PyUnresolvedReferences
|
|
53
53
|
from funboost.concurrent_pool.bounded_threadpoolexcutor import \
|
|
54
54
|
BoundedThreadPoolExecutor
|
|
55
|
-
from func_timeout import func_set_timeout
|
|
55
|
+
from func_timeout import func_set_timeout # noqa
|
|
56
56
|
from funboost.concurrent_pool.custom_evenlet_pool_executor import evenlet_timeout_deco, \
|
|
57
57
|
check_evenlet_monkey_patch, CustomEventletPoolExecutor
|
|
58
58
|
from funboost.concurrent_pool.custom_gevent_pool_executor import gevent_timeout_deco, \
|
|
@@ -747,8 +747,7 @@ class AbstractConsumer(LoggerLevelSetterMixin, metaclass=abc.ABCMeta, ):
|
|
|
747
747
|
f'第{current_retry_times + 1}次 运行, 正确了,函数运行时间是 {round(time.time() - t_start, 4)} 秒,入参是 {function_only_params} '
|
|
748
748
|
f' 结果是 {result_str_to_be_print} , {self._get_concurrent_info()} ')
|
|
749
749
|
except BaseException as e:
|
|
750
|
-
if isinstance(e, (
|
|
751
|
-
ExceptionForRequeue)): # mongo经常维护备份时候插入不了或挂了,或者自己主动抛出一个ExceptionForRequeue类型的错误会重新入队,不受指定重试次数逇约束。
|
|
750
|
+
if isinstance(e, (ExceptionForRequeue,)): # mongo经常维护备份时候插入不了或挂了,或者自己主动抛出一个ExceptionForRequeue类型的错误会重新入队,不受指定重试次数逇约束。
|
|
752
751
|
self.logger.critical(f'函数 [{self.consuming_function.__name__}] 中发生错误 {type(e)} {e},消息重新入队')
|
|
753
752
|
time.sleep(1) # 防止快速无限出错入队出队,导致cpu和中间件忙
|
|
754
753
|
self._requeue(kw)
|
|
@@ -851,8 +850,7 @@ class AbstractConsumer(LoggerLevelSetterMixin, metaclass=abc.ABCMeta, ):
|
|
|
851
850
|
f'第{current_retry_times + 1}次 运行, 正确了,函数运行时间是 {round(time.time() - t_start, 4)} 秒,'
|
|
852
851
|
f'入参是 【 {function_only_params} 】 ,结果是 {result_str_to_be_print} 。 {corotinue_obj} ')
|
|
853
852
|
except BaseException as e:
|
|
854
|
-
if isinstance(e, (
|
|
855
|
-
ExceptionForRequeue)): # mongo经常维护备份时候插入不了或挂了,或者自己主动抛出一个ExceptionForRequeue类型的错误会重新入队,不受指定重试次数逇约束。
|
|
853
|
+
if isinstance(e, (ExceptionForRequeue,)): # mongo经常维护备份时候插入不了或挂了,或者自己主动抛出一个ExceptionForRequeue类型的错误会重新入队,不受指定重试次数逇约束。
|
|
856
854
|
self.logger.critical(f'函数 [{self.consuming_function.__name__}] 中发生错误 {type(e)} {e},消息重新入队')
|
|
857
855
|
# time.sleep(1) # 防止快速无限出错入队出队,导致cpu和中间件忙
|
|
858
856
|
await asyncio.sleep(1)
|
|
@@ -1057,7 +1055,7 @@ class ConcurrentModeDispatcher(LoggerMixin):
|
|
|
1057
1055
|
self.timeout_deco = None
|
|
1058
1056
|
if self._concurrent_mode in (ConcurrentModeEnum.THREADING, ConcurrentModeEnum.SINGLE_THREAD):
|
|
1059
1057
|
# self.timeout_deco = decorators.timeout
|
|
1060
|
-
self.timeout_deco = func_set_timeout
|
|
1058
|
+
self.timeout_deco = func_set_timeout # 这个超时装饰器性能好很多。
|
|
1061
1059
|
elif self._concurrent_mode == ConcurrentModeEnum.GEVENT:
|
|
1062
1060
|
self.timeout_deco = gevent_timeout_deco
|
|
1063
1061
|
elif self._concurrent_mode == ConcurrentModeEnum.EVENTLET:
|
funboost/utils/dependency_packages_in_pythonpath/__pycache__/add_to_pythonpath.cpython-311.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from aioredis.client import Redis, StrictRedis
|
|
2
|
+
from aioredis.connection import (
|
|
3
|
+
BlockingConnectionPool,
|
|
4
|
+
Connection,
|
|
5
|
+
ConnectionPool,
|
|
6
|
+
SSLConnection,
|
|
7
|
+
UnixDomainSocketConnection,
|
|
8
|
+
)
|
|
9
|
+
from aioredis.exceptions import (
|
|
10
|
+
AuthenticationError,
|
|
11
|
+
AuthenticationWrongNumberOfArgsError,
|
|
12
|
+
BusyLoadingError,
|
|
13
|
+
ChildDeadlockedError,
|
|
14
|
+
ConnectionError,
|
|
15
|
+
DataError,
|
|
16
|
+
InvalidResponse,
|
|
17
|
+
PubSubError,
|
|
18
|
+
ReadOnlyError,
|
|
19
|
+
RedisError,
|
|
20
|
+
ResponseError,
|
|
21
|
+
TimeoutError,
|
|
22
|
+
WatchError,
|
|
23
|
+
)
|
|
24
|
+
from aioredis.utils import from_url
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def int_or_str(value):
|
|
28
|
+
try:
|
|
29
|
+
return int(value)
|
|
30
|
+
except ValueError:
|
|
31
|
+
return value
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
__version__ = "2.0.1"
|
|
35
|
+
VERSION = tuple(map(int_or_str, __version__.split(".")))
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"AuthenticationError",
|
|
39
|
+
"AuthenticationWrongNumberOfArgsError",
|
|
40
|
+
"BlockingConnectionPool",
|
|
41
|
+
"BusyLoadingError",
|
|
42
|
+
"ChildDeadlockedError",
|
|
43
|
+
"Connection",
|
|
44
|
+
"ConnectionError",
|
|
45
|
+
"ConnectionPool",
|
|
46
|
+
"DataError",
|
|
47
|
+
"from_url",
|
|
48
|
+
"InvalidResponse",
|
|
49
|
+
"PubSubError",
|
|
50
|
+
"ReadOnlyError",
|
|
51
|
+
"Redis",
|
|
52
|
+
"RedisError",
|
|
53
|
+
"ResponseError",
|
|
54
|
+
"SSLConnection",
|
|
55
|
+
"StrictRedis",
|
|
56
|
+
"TimeoutError",
|
|
57
|
+
"UnixDomainSocketConnection",
|
|
58
|
+
"WatchError",
|
|
59
|
+
]
|
funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-311.pyc
ADDED
|
Binary file
|
funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-37.pyc
ADDED
|
Binary file
|
funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-311.pyc
ADDED
|
Binary file
|
funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-37.pyc
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|