Skip to content

Commit

Permalink
improve: celery启动方式优化,添加default队列 TencentBlueKing#275
Browse files Browse the repository at this point in the history
  • Loading branch information
pagezz-canway committed May 28, 2019
1 parent 3138bf2 commit 4922b2c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 58 deletions.
1 change: 1 addition & 0 deletions Procfile
@@ -1,4 +1,5 @@
web: gunicorn wsgi -w 8 -b :$PORT --access-logfile - --error-logfile - --access-logformat '[%(h)s] %({request_id}i)s %(u)s %(t)s "%(r)s" %(s)s %(D)s %(b)s "%(f)s" "%(a)s"'
dworker: python manage.py celery worker -Q default -n default@%h -c 6 -l info --maxtasksperchild=50
pworker: python manage.py celery worker -Q pipeline -n pipeline_worker@%h -c 6 -l info --maxtasksperchild=50
sworker: celery worker -A blueapps.core.celery -P gevent -Q service_schedule -c 6 -l info -n schedule_worker@%h --maxtasksperchild=50
cworker: python manage.py celery worker -Q pipeline_additional_task -n common_worker@%h -c 6 -l info --maxtasksperchild=50
Expand Down
3 changes: 2 additions & 1 deletion pipeline/celery/settings.py
Expand Up @@ -46,11 +46,12 @@
}

CELERY_QUEUES = (
Queue('default', default_exchange, routing_key='default'),
Queue('pipeline', default_exchange, routing_key='pipeline_push'),
Queue('service_schedule', default_exchange, routing_key='schedule_service'),
Queue('pipeline_additional_task', default_exchange, routing_key='additional_task')
)

CELERY_DEFAULT_QUEUE = 'pipeline_additional_task'
CELERY_DEFAULT_QUEUE = 'default'
CELERY_DEFAULT_EXCHANGE = 'default'
CELERY_DEFAULT_ROUTING_KEY = 'default'
12 changes: 0 additions & 12 deletions pipeline/engine/celery/__init__.py

This file was deleted.

45 changes: 0 additions & 45 deletions pipeline/engine/celery/settings.py

This file was deleted.

0 comments on commit 4922b2c

Please sign in to comment.