funboost 42.1__py3-none-any.whl → 42.2__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__ = "42.1"
16
+ __version__ = "42.2"
17
17
 
18
18
  from funboost.set_frame_config import show_frame_config
19
19
 
@@ -7,6 +7,7 @@ from functools import partial
7
7
 
8
8
  import celery
9
9
 
10
+ import nb_log
10
11
  from funboost.funboost_config_deafult import BrokerConnConfig,FunboostCommonConfig
11
12
  from funboost import ConcurrentModeEnum
12
13
  from funboost.core.loggers import get_funboost_file_logger,get_logger
@@ -109,4 +110,14 @@ class CeleryHelper:
109
110
  使用nb_log的日志来取代celery的日志
110
111
  """
111
112
  celery_app.conf.worker_hijack_root_logger = False
113
+ # logging.getLogger('celery').handlers=[]
114
+ # logging.getLogger('celery.worker.strategy').handlers = []
115
+ # logging.getLogger('celery.app.trace').handlers = []
116
+ # logging.getLogger('celery.worker').handlers = []
117
+ # logging.getLogger('celery.app').handlers = []
118
+ # logging.getLogger().handlers=[]
112
119
  get_logger('celery', log_level_int=log_level, log_filename=log_filename, formatter_template=formatter_template, )
120
+ get_logger(None, log_level_int=logging.WARNING, log_filename=log_filename, formatter_template=formatter_template, )
121
+ for name in ['celery','celery.worker.strategy','celery.app.trace','celery.worker','celery.app',None]:
122
+ nb_log.LogManager(name).prevent_add_handlers()
123
+ nb_log.LogManager(None).preset_log_level(logging.WARNING)
@@ -85,6 +85,24 @@ class BoosterFire(object):
85
85
  BoostersManager.get_booster(queue_anme).consume()
86
86
  ctrl_c_recv()
87
87
 
88
+ def consume_all_queues(self,):
89
+ """
90
+ 启动所有消息队列名的消费,无需指定队列名;
91
+ 例子: consume_all_queues
92
+ """
93
+ for queue_anme in BoostersManager.get_all_queues():
94
+ BoostersManager.get_booster(queue_anme).consume()
95
+ ctrl_c_recv()
96
+
97
+ def multi_process_consume_all_queues(self,process_num):
98
+ """
99
+ 启动所有消息队列名的消费,无需指定队列名,每个队列启动n个单独的消费进程;
100
+ 例子: multi_process_consume_all_queues 2
101
+ """
102
+ for queue_anme in BoostersManager.get_all_queues():
103
+ BoostersManager.get_booster(queue_anme).multi_process_consume(process_num)
104
+ ctrl_c_recv()
105
+
88
106
  def multi_process_consume(self, **queue_name__process_num):
89
107
  """
90
108
  使用多进程启动消费,每个队列开启多个单独的进程消费;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: funboost
3
- Version: 42.1
3
+ Version: 42.2
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,11 +1,11 @@
1
- funboost/__init__.py,sha256=py1Yjnc95Qm7bEmoR0lbessQQ3FM8rouBDYOA1T8Ncc,3766
1
+ funboost/__init__.py,sha256=jbK_usCoKhBzDuzne46HhWlbx6ZRkD6-hT_JjmT3iKg,3766
2
2
  funboost/__init__old.py,sha256=07A1MLsxLtuRQQOIfDyphddOwNBrGe34enoHWAnjV14,20379
3
3
  funboost/__main__.py,sha256=-6Nogi666Y0LN8fVm3JmHGTOk8xEGWvotW_GDbSaZME,1065
4
4
  funboost/constant.py,sha256=haAbx2cvTN9itPzBG4v3_ODIi1-RudvBj6s_QjniqjU,7162
5
5
  funboost/funboost_config_deafult.py,sha256=9F8xhjJqe32HNcDGVCTyaJRAv_2Ei2zDoKwNC-QJk5c,6053
6
6
  funboost/set_frame_config.py,sha256=bEsW4a4EuE3PpyypNuWSfsB-_bvT94pktJGKk4r-rlo,14328
7
7
  funboost/assist/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- funboost/assist/celery_helper.py,sha256=xp_t6DnQ57H40ovYGdL55Q5B1UojEy0WfMHZrvj7hDQ,4882
8
+ funboost/assist/celery_helper.py,sha256=ae8nbwHEulXa9gSKrNkW87SS8BZx7ZJwzWYY6hniE2g,5603
9
9
  funboost/assist/dramatiq_helper.py,sha256=9mUyfBMAJXzwvB8LwOmapn3rY30a6UXt3tNOfL6OXoM,2106
10
10
  funboost/assist/huey_helper.py,sha256=PuJHIzK5oRd5RzbuxLMHhWlkKO3J-ObRK0mrMs_iQWs,1770
11
11
  funboost/assist/rocketry_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -96,7 +96,7 @@ funboost/core/try_get_user_funboost_common_config.py,sha256=47DEQpj8HBSa-_TImW-5
96
96
  funboost/core/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
97
  funboost/core/cli/discovery_boosters.py,sha256=G23pwJDNi5iQnkgOEzMlioaK-rPCaMx3RJpAcTT1_9g,2930
98
98
  funboost/core/cli/funboost_cli_user_templ.py,sha256=vII8IELLhlYpHZmfUsdt-UE699tOSBugkiFl90sOLKo,2109
99
- funboost/core/cli/funboost_fire.py,sha256=LUE_bUV3577RhJ6K1rP0kSv2cwLLqpRZqBotMjx_sqg,4573
99
+ funboost/core/cli/funboost_fire.py,sha256=aXp98CGozh1QgTVhL5RWEeae2DyjeTtZDs0EFPxrBJ8,5315
100
100
  funboost/factories/__init__.py,sha256=s7kKKjR1HU5eMjPD6r5b-SXTVMo1zBp2JjOAtkyt5Yo,178
101
101
  funboost/factories/broker_kind__publsiher_consumer_type_map.py,sha256=2fWuNVDOYbs8CCrQnQtWIc3wwQ5a9AOFEd7-cufj3I8,9630
102
102
  funboost/factories/consumer_factory.py,sha256=rPceMsUr2mrcFXL-_3kQGknNiADjfgTh9wXG1qd8yAw,1041
@@ -261,9 +261,9 @@ funboost/utils/pysnooper_ydf/utils.py,sha256=evSmGi_Oul7vSP47AJ0DLjFwoCYCfunJZ1m
261
261
  funboost/utils/pysnooper_ydf/variables.py,sha256=QejRDESBA06KG9OH4sBT4J1M55eaU29EIHg8K_igaXo,3693
262
262
  funboost/utils/times/__init__.py,sha256=Y4bQD3SIA_E7W2YvHq2Qdi0dGM4H2DxyFNdDOuFOq1w,2417
263
263
  funboost/utils/times/version.py,sha256=11XfnZVVzOgIhXXdeN_mYfdXThfrsbQHpA0wCjz-hpg,17
264
- funboost-42.1.dist-info/LICENSE,sha256=9EPP2ktG_lAPB8PjmWV-c9BiaJHc_FP6pPLcUrUwx0E,11562
265
- funboost-42.1.dist-info/METADATA,sha256=1AFOO6q5UAJQRKZuEnaVSSy_6e52SLpWmadDrbQWc78,30477
266
- funboost-42.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
267
- funboost-42.1.dist-info/entry_points.txt,sha256=yMSSAGRzRAAhGyNNQHw24MooKlDZsaJ499_D6fPl58A,96
268
- funboost-42.1.dist-info/top_level.txt,sha256=K8WuKnS6MRcEWxP1NvbmCeujJq6TEfbsB150YROlRw0,9
269
- funboost-42.1.dist-info/RECORD,,
264
+ funboost-42.2.dist-info/LICENSE,sha256=9EPP2ktG_lAPB8PjmWV-c9BiaJHc_FP6pPLcUrUwx0E,11562
265
+ funboost-42.2.dist-info/METADATA,sha256=-Ejr8ipY45w6t4QOP3yt4nvsYpD35zQeayRqYXAVx1A,30477
266
+ funboost-42.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
267
+ funboost-42.2.dist-info/entry_points.txt,sha256=yMSSAGRzRAAhGyNNQHw24MooKlDZsaJ499_D6fPl58A,96
268
+ funboost-42.2.dist-info/top_level.txt,sha256=K8WuKnS6MRcEWxP1NvbmCeujJq6TEfbsB150YROlRw0,9
269
+ funboost-42.2.dist-info/RECORD,,