V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
fanhaipeng0403
V2EX  ›  Python

关于 celery 的 queue 配置

  •  
  •   fanhaipeng0403 · 2019-01-07 15:55:35 +08:00 · 1050 次点击
    这是一个创建于 1929 天前的主题,其中的信息可能已经有所发展或是发生改变。
    celery 里面有个配置时,当指定队列不存在时,创建队列
    
    task_create_missing_queues
    Default: Enabled
    
    这么使  foo.apply_async(args=(ds.id,), queue="xxxx")
    
    我想问这个配置和 conf 里配置的
                                                                                             
      CELERY_QUEUES = (                                                                      
                                                                                             
          Queue('xxxx', Exchange('xxxx'), routing_key='xxxx'),                     
                         
      )   
      
    有什么区别么
    
    
    
    比如我有很多任务,之前解决这个问题,是把不同的任务分配到定义在 conf 里的不同队列
    
    
    是不是我不用显示定义,分配任务的时候 foo.apply_async(args=(ds.id,), queue="random ()")
    
    也可以??
    
      
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   917 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:35 · PVG 04:35 · LAX 13:35 · JFK 16:35
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.