Celery multi以1个或多个进程开始

时间:2015-10-08 05:29:04

标签: python process celery

当我和3名工人一起经营芹菜时如下:

celery -A tasks multi start default, high, low -Q:1 default -c:1 6 -Q:2 high -c:2 2 -Q:3 low -c:3 2 -l info -E --pidfile=/var/run/celery/%n.pid --logfile=/var/log/celery/%n.log 

ps aux | grep'芹菜工人'

vagrant   2447 14.0  7.3 262216 36708 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2458 15.5  7.2 259656 36216 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n low,@server -A box_monitor -l info -Q low -c 1 --logfile=/var/log/celery/low,.log --pidfile=/var/run/celery/low,.pid
vagrant   2468  0.0  6.4 261192 32380 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2469  0.0  6.4 261192 32372 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2470  0.0  6.4 261192 32372 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2471  0.0  6.4 261192 32372 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2472  0.0  6.4 261192 32376 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2473  0.0  6.4 261192 32376 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n default,@server -A box_monitor -l info -Q default -c 6 --logfile=/var/log/celery/default,.log --pidfile=/var/run/celery/default,.pid
vagrant   2475 13.0  7.2 259656 36236 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n high@server -A box_monitor -l info -Q high -c 1 --logfile=/var/log/celery/high.log --pidfile=/var/run/celery/high.pid
vagrant   2480  0.0  6.3 258588 31920 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n low,@server -A box_monitor -l info -Q low -c 1 --logfile=/var/log/celery/low,.log --pidfile=/var/run/celery/low,.pid
vagrant   2481  0.0  6.4 258976 32304 ?        S    05:20   0:00 /usr/local/bin/python2.7 -m celery worker -E -n high@server -A box_monitor -l info -Q high -c 1 --logfile=/var/log/celery/high.log --pidfile=/var/run/celery/high.pid

10是预期的流程编号,但它是11.为什么会这样?

1 个答案:

答案 0 :(得分:2)

第一个进程(2447)是启动另一个进程并控制它们的进程。它不会做任何实际工作,其他10个流程是工人正在进行实际处理。