funboost 41.6__py3-none-any.whl → 41.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 +1 -1
- funboost/consumers/base_consumer.py +11 -7
- funboost/core/func_params_model.py +2 -3
- funboost/publishers/redis_publisher_priority.py +1 -1
- {funboost-41.6.dist-info → funboost-41.7.dist-info}/METADATA +1 -1
- {funboost-41.6.dist-info → funboost-41.7.dist-info}/RECORD +10 -10
- {funboost-41.6.dist-info → funboost-41.7.dist-info}/LICENSE +0 -0
- {funboost-41.6.dist-info → funboost-41.7.dist-info}/WHEEL +0 -0
- {funboost-41.6.dist-info → funboost-41.7.dist-info}/entry_points.txt +0 -0
- {funboost-41.6.dist-info → funboost-41.7.dist-info}/top_level.txt +0 -0
funboost/__init__.py
CHANGED
|
@@ -164,7 +164,10 @@ class AbstractConsumer(LoggerLevelSetterMixin, metaclass=abc.ABCMeta, ):
|
|
|
164
164
|
self._last_timestamp_print_msg_num = 0
|
|
165
165
|
|
|
166
166
|
self._result_persistence_helper: ResultPersistenceHelper
|
|
167
|
-
|
|
167
|
+
broker_exclusive_config_merge = dict()
|
|
168
|
+
broker_exclusive_config_merge.update(self.BROKER_EXCLUSIVE_CONFIG_DEFAULT)
|
|
169
|
+
broker_exclusive_config_merge.update(self.consumer_params.broker_exclusive_config)
|
|
170
|
+
self.consumer_params.broker_exclusive_config = broker_exclusive_config_merge
|
|
168
171
|
|
|
169
172
|
self._stop_flag = None
|
|
170
173
|
self._pause_flag = None # 暂停消费标志,从reids读取
|
|
@@ -206,6 +209,7 @@ class AbstractConsumer(LoggerLevelSetterMixin, metaclass=abc.ABCMeta, ):
|
|
|
206
209
|
self._consuming_function_is_asyncio = inspect.iscoroutinefunction(self.consuming_function)
|
|
207
210
|
self.custom_init()
|
|
208
211
|
# develop_logger.warning(consumer_params.log_filename)
|
|
212
|
+
print(self.consumer_params.broker_exclusive_config)
|
|
209
213
|
self.publisher_params = PublisherParams(queue_name=consumer_params.queue_name, consuming_function=consumer_params.consuming_function,
|
|
210
214
|
broker_kind=self.BROKER_KIND, log_level=consumer_params.log_level,
|
|
211
215
|
logger_prefix=consumer_params.logger_prefix,
|
|
@@ -213,7 +217,6 @@ class AbstractConsumer(LoggerLevelSetterMixin, metaclass=abc.ABCMeta, ):
|
|
|
213
217
|
log_filename=consumer_params.log_filename,
|
|
214
218
|
broker_exclusive_config=self.consumer_params.broker_exclusive_config)
|
|
215
219
|
if is_main_process:
|
|
216
|
-
print(self.consumer_params.get_str_dict())
|
|
217
220
|
self.logger.info(f'{self.queue_name} consumer 的消费者配置:\n {self.consumer_params.json_str_value()}')
|
|
218
221
|
atexit.register(self.join_shedual_task_thread)
|
|
219
222
|
|
|
@@ -232,11 +235,12 @@ class AbstractConsumer(LoggerLevelSetterMixin, metaclass=abc.ABCMeta, ):
|
|
|
232
235
|
self.logger.info(f'队列 {self.queue_name} 的日志写入到 {nb_log_config_default.LOG_PATH} 文件夹的 {log_filename} 和 {nb_log.generate_error_file_name(log_filename)} 文件中')
|
|
233
236
|
|
|
234
237
|
def _check_broker_exclusive_config(self):
|
|
235
|
-
broker_exclusive_config_keys = self.
|
|
236
|
-
if
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
broker_exclusive_config_keys = self.BROKER_EXCLUSIVE_CONFIG_DEFAULT.keys()
|
|
239
|
+
if self.consumer_params.broker_exclusive_config:
|
|
240
|
+
if set(self.consumer_params.broker_exclusive_config.keys()).issubset(broker_exclusive_config_keys):
|
|
241
|
+
self.logger.info(f'当前消息队列中间件能支持特殊独有配置 {self.consumer_params.broker_exclusive_config.keys()}')
|
|
242
|
+
else:
|
|
243
|
+
self.logger.warning(f'当前消息队列中间件含有不支持的特殊配置 {self.consumer_params.broker_exclusive_config.keys()},能支持的特殊独有配置包括 {broker_exclusive_config_keys}')
|
|
240
244
|
|
|
241
245
|
def _check_monkey_patch(self):
|
|
242
246
|
if self.consumer_params.concurrent_mode == ConcurrentModeEnum.GEVENT:
|
|
@@ -57,14 +57,13 @@ class BaseJsonAbleModel(BaseModel):
|
|
|
57
57
|
try:
|
|
58
58
|
return json.dumps(self.get_str_dict(), ensure_ascii=False, )
|
|
59
59
|
except TypeError as e:
|
|
60
|
-
return
|
|
61
|
-
|
|
60
|
+
return str(self.get_str_dict())
|
|
62
61
|
|
|
63
62
|
def json_pre(self):
|
|
64
63
|
try:
|
|
65
64
|
return json.dumps(self.get_str_dict(), ensure_ascii=False, indent=4)
|
|
66
65
|
except TypeError as e:
|
|
67
|
-
return
|
|
66
|
+
return str(self.get_str_dict())
|
|
68
67
|
|
|
69
68
|
def update_from_dict(self, dictx: dict):
|
|
70
69
|
for k, v in dictx.items():
|
|
@@ -37,7 +37,7 @@ class RedisPriorityPublisher(FlushRedisQueueMixin,AbstractPublisher, RedisMixin,
|
|
|
37
37
|
|
|
38
38
|
def concrete_realization_of_publish(self, msg):
|
|
39
39
|
queue_name = self.build_queue_name_by_msg(msg)
|
|
40
|
-
self.logger.debug([queue_name, msg])
|
|
40
|
+
# self.logger.debug([queue_name, msg])
|
|
41
41
|
self.redis_db_frame.rpush(queue_name, msg)
|
|
42
42
|
|
|
43
43
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: funboost
|
|
3
|
-
Version: 41.
|
|
3
|
+
Version: 41.7
|
|
4
4
|
Summary: pip install funboost,python全功能分布式函数调度框架,。支持python所有类型的并发模式和一切知名消息队列中间件,支持如 celery dramatiq等框架整体作为funboost中间件,python函数加速器,框架包罗万象,用户能想到的控制功能全都有。一统编程思维,兼容50% python业务场景,适用范围广。只需要一行代码即可分布式执行python一切函数,99%用过funboost的pythoner 感受是 简易 方便 强劲 强大,相见恨晚
|
|
5
5
|
Home-page: https://github.com/ydf0509/funboost
|
|
6
6
|
Author: bfzs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
funboost/__init__.py,sha256=
|
|
1
|
+
funboost/__init__.py,sha256=wCuBpQD80bkuElUOTfEAnLQmAfOZsdFNjl5vqOWLbGU,3765
|
|
2
2
|
funboost/__init__old.py,sha256=cSzw-ZQqtAAp5_-7eONXQT5fwz_JbZlRjDQPASDLUHk,20378
|
|
3
3
|
funboost/__main__.py,sha256=-6Nogi666Y0LN8fVm3JmHGTOk8xEGWvotW_GDbSaZME,1065
|
|
4
4
|
funboost/constant.py,sha256=VGwOZGP7U9Hq5--gPGT7mZFQ-a171gcxFYupJOMw7Y4,7162
|
|
@@ -33,7 +33,7 @@ funboost/concurrent_pool/backup/async_pool_executor0223.py,sha256=RVUZiylUvpTm6U
|
|
|
33
33
|
funboost/concurrent_pool/backup/async_pool_executor_back.py,sha256=KL6zEQaa1KkZOlAO85mCC1gwLm-YC5Ghn21IUom0UKM,9598
|
|
34
34
|
funboost/concurrent_pool/backup/async_pool_executor_janus.py,sha256=OHMWJ9l3EYTpPpcrPrGGKd4K0tmQ2PN8HiX0Dta0EOo,5728
|
|
35
35
|
funboost/consumers/__init__.py,sha256=ZXY_6Kut1VYNQiF5aWEgIWobsW1ht9YUP0TdRZRWFqI,126
|
|
36
|
-
funboost/consumers/base_consumer.py,sha256=
|
|
36
|
+
funboost/consumers/base_consumer.py,sha256=pNWgvJQ7hWf685QsF80ne2iZahZA3x4hyxrkgyPvvN8,72989
|
|
37
37
|
funboost/consumers/celery_consumer.py,sha256=W25gbGyimf8KG5lLbtgar3Ix7F3O4cIRBLtRq8nJ0AE,9216
|
|
38
38
|
funboost/consumers/confirm_mixin.py,sha256=eY6fNwx51Hn4bQSYRjyTRwOqfCGsikVnd2Ga_Ep31N4,6062
|
|
39
39
|
funboost/consumers/dramatiq_consumer.py,sha256=ozmeAfeF0U-YNYHK4suQB0N264h5AZdfMH0O45Mh-8A,2229
|
|
@@ -82,7 +82,7 @@ funboost/core/active_cousumer_info_getter.py,sha256=09fEc-BTEIRfDDfHmOvKnMjLjtOy
|
|
|
82
82
|
funboost/core/booster.py,sha256=_s-PRIYaMCZo7sO7vkR1Ijt_BymsIeuZcyQuFafaytI,13238
|
|
83
83
|
funboost/core/exceptions.py,sha256=oXOEBBCoU8jJv1uyWrcItnGi778Hrx2c_tA5KAbRGy8,1201
|
|
84
84
|
funboost/core/fabric_deploy_helper.py,sha256=KPjifNy1G1tDOT2eaR0X8hegot0HUk5vF-P1DnhxME4,8941
|
|
85
|
-
funboost/core/func_params_model.py,sha256=
|
|
85
|
+
funboost/core/func_params_model.py,sha256=a9HePWb7PIPNbwaEh4HrCQ3SF26_Atx2mccwESVZlcg,17543
|
|
86
86
|
funboost/core/function_result_status_config.py,sha256=PyjqAQOiwsLt28sRtH-eYRjiI3edPFO4Nde0ILFRReE,1764
|
|
87
87
|
funboost/core/function_result_status_saver.py,sha256=wjDuRZAtZ92Gt3sIiBN6SDkj-NiNoMfPeEnomga_DPQ,8968
|
|
88
88
|
funboost/core/helper_funs.py,sha256=SKSMKytJTOFQJsuMKWJ-_mQg6e_Bgpq1ANDzjjBAcio,1192
|
|
@@ -142,7 +142,7 @@ funboost/publishers/rabbitmq_pika_publisher.py,sha256=QygZv96tYmfJcs8Dukv3J_x134
|
|
|
142
142
|
funboost/publishers/rabbitmq_rabbitpy_publisher.py,sha256=GGXPKxE6-mAjqMIKqwvR9d7L-zuJQcQoU9uRsQLNGas,1953
|
|
143
143
|
funboost/publishers/redis_publisher.py,sha256=EDnQSt73FE2PGq0WHyvsMuaoD_6wp_tuZveWrMF7iLY,3439
|
|
144
144
|
funboost/publishers/redis_publisher_lpush.py,sha256=xEWuCTtbDcKFLTxGrECrbIVapFfUwqX2-GHenMClu-Q,278
|
|
145
|
-
funboost/publishers/redis_publisher_priority.py,sha256=
|
|
145
|
+
funboost/publishers/redis_publisher_priority.py,sha256=7qiGBZN4k-YQ1EML8kAXCYlpcOC8Yl5qNfPUeMgevlw,2205
|
|
146
146
|
funboost/publishers/redis_publisher_simple.py,sha256=CxUqi2_ykOhKhQFByNJ8nUaFjjchA-YzSE72ng1_OiM,760
|
|
147
147
|
funboost/publishers/redis_pubsub_publisher.py,sha256=GA3TzN91OT2d-Ei76rp_Sd3Au8IcihFupo36izB8dis,737
|
|
148
148
|
funboost/publishers/redis_queue_flush_mixin.py,sha256=d-AgJiCuX25mOwP2gMorGbXCaLuFpqWO4jAJXJDBfk0,732
|
|
@@ -259,9 +259,9 @@ funboost/utils/pysnooper_ydf/utils.py,sha256=evSmGi_Oul7vSP47AJ0DLjFwoCYCfunJZ1m
|
|
|
259
259
|
funboost/utils/pysnooper_ydf/variables.py,sha256=QejRDESBA06KG9OH4sBT4J1M55eaU29EIHg8K_igaXo,3693
|
|
260
260
|
funboost/utils/times/__init__.py,sha256=Y4bQD3SIA_E7W2YvHq2Qdi0dGM4H2DxyFNdDOuFOq1w,2417
|
|
261
261
|
funboost/utils/times/version.py,sha256=11XfnZVVzOgIhXXdeN_mYfdXThfrsbQHpA0wCjz-hpg,17
|
|
262
|
-
funboost-41.
|
|
263
|
-
funboost-41.
|
|
264
|
-
funboost-41.
|
|
265
|
-
funboost-41.
|
|
266
|
-
funboost-41.
|
|
267
|
-
funboost-41.
|
|
262
|
+
funboost-41.7.dist-info/LICENSE,sha256=9EPP2ktG_lAPB8PjmWV-c9BiaJHc_FP6pPLcUrUwx0E,11562
|
|
263
|
+
funboost-41.7.dist-info/METADATA,sha256=UV1IbVn2BXAEt8ZlXZ3V_8qYUM8sInzDdm4IGQxg6PU,30484
|
|
264
|
+
funboost-41.7.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
265
|
+
funboost-41.7.dist-info/entry_points.txt,sha256=yMSSAGRzRAAhGyNNQHw24MooKlDZsaJ499_D6fPl58A,96
|
|
266
|
+
funboost-41.7.dist-info/top_level.txt,sha256=K8WuKnS6MRcEWxP1NvbmCeujJq6TEfbsB150YROlRw0,9
|
|
267
|
+
funboost-41.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|