推荐学习书目
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 · Jan 7, 2019 · 1457 views
    This topic created in 2704 days ago, the information mentioned may be changed or developed.
    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 ()")
    
    也可以??
    
      
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   934 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 19:49 · PVG 03:49 · LAX 12:49 · JFK 15:49
    ♥ Do have faith in what you're doing.