标签:message gui 参考 zip mes 序列 guid worker compress
Celery支持不同的并发和序列化的手段 并发:Prefork, Eventlet, gevent, threads/single threaded 序列化:pickle, json, yaml, msgpack. zlib, bzip2 compression, Cryptographic message signing 等等 默认是进程池方式,进程数以当前机器的CPU核数为参考,每个CPU开四个进程。 如何自己指定进程数: celery worker -A proj --concurrency=4 如何改变进程池方式为协程方式: celery worker -A proj --concurrency=1000 -P eventlet -c 1000 # 安装eventlet模块 $ pip install eventlet # 启用 Eventlet 池 $ celery -A celery_tasks.main worker -l info -P eventlet -c 1000 https://www.cnblogs.com/yuanfang0903/p/13518236.html https://docs.celeryproject.org/en/v4.4.6/reference/celery.bin.worker.html#cmdoption-celery-worker-c https://docs.celeryproject.org/en/v4.4.6/userguide/concurrency/eventlet.html#concurrency-eventlet
标签:message gui 参考 zip mes 序列 guid worker compress
原文地址:https://www.cnblogs.com/yum777/p/14287174.html