This document describes an older version of Celery (2.1). For the latest stable version please go here.

Celeryd Multi Tool - celery.bin.celeryd_multi

Examples

# Advanced example starting 10 workers in the background:
#   * Three of the workers processes the images and video queue
#   * Two of the workers processes the data queue with loglevel DEBUG
#   * the rest processes the default' queue.
$ celeryd-multi start 10 -l INFO -Q:1-3 images,video -Q:4,5:data
    -Q default -L:4,5 DEBUG

# You can show the commands necessary to start the workers with
# the "show" command:
$ celeryd-multi show 10 -l INFO -Q:1-3 images,video -Q:4,5:data
    -Q default -L:4,5 DEBUG

# 3 workers, with 3 processes each
$ celeryd-multi start 3 -c 3
celeryd -n celeryd1.myhost -c 3
celeryd -n celeryd2.myhost -c 3
celeryd- n celeryd3.myhost -c 3

# start 3 named workers
$ celeryd-multi start image video data -c 3
celeryd -n image.myhost -c 3
celeryd -n video.myhost -c 3
celeryd -n data.myhost -c 3

# specify custom hostname
$ celeryd-multi start 2 -n worker.example.com -c 3
celeryd -n celeryd1.worker.example.com -c 3
celeryd -n celeryd2.worker.example.com -c 3

# Additionl options are added to each celeryd',
# but you can also modify the options for ranges of or single workers

# 3 workers: Two with 3 processes, and one with 10 processes.
$ celeryd-multi start 3 -c 3 -c:1 10
celeryd -n celeryd1.myhost -c 10
celeryd -n celeryd2.myhost -c 3
celeryd -n celeryd3.myhost -c 3

# can also specify options for named workers
$ celeryd-multi start image video data -c 3 -c:image 10
celeryd -n image.myhost -c 10
celeryd -n video.myhost -c 3
celeryd -n data.myhost -c 3

# ranges and lists of workers in options is also allowed:
# (-c:1-3 can also be written as -c:1,2,3)
$ celeryd-multi start 5 -c 3  -c:1-3 10
celeryd -n celeryd1.myhost -c 10
celeryd -n celeryd2.myhost -c 10
celeryd -n celeryd3.myhost -c 10
celeryd -n celeryd4.myhost -c 3
celeryd -n celeryd5.myhost -c 3

# lists also works with named workers
$ celeryd-multi start foo bar baz xuzzy -c 3 -c:foo,bar,baz 10
celeryd -n foo.myhost -c 10
celeryd -n bar.myhost -c 10
celeryd -n baz.myhost -c 10
celeryd -n xuzzy.myhost -c 3
class celery.bin.celeryd_multi.MultiTool
error(msg=None)
execute_from_commandline(argv, cmd='celeryd')
expand(argv, cmd=None)
get(argv, cmd)
getpids(p, cmd, callback=None)
help(argv, cmd=None)
info(msg, newline=True)
kill(argv, cmd)
names(argv, cmd)
node_alive(pid)
note(msg, newline=True)
restart(argv, cmd)
retcode = 0
show(argv, cmd)
shutdown_nodes(nodes, sig=15, retry=None, callback=None)
signal_node(nodename, pid, sig)
splash()
start(argv, cmd)
stop(argv, cmd)
usage()
waitexec(argv, path='/home/docs/checkouts/readthedocs.org/user_builds/celery/envs/2.1-archived/bin/python')
with_detacher_default_options(p)
class celery.bin.celeryd_multi.NamespacedOptionParser(args)
add_option(name, value, short=False, ns=None)
optmerge(ns, defaults=None)
parse()
process_long_opt(arg, value=None)
process_short_opt(arg, value=None)
celery.bin.celeryd_multi.abbreviations(map)
celery.bin.celeryd_multi.findsig(args, default=15)
celery.bin.celeryd_multi.format_opt(opt, value)
celery.bin.celeryd_multi.main()
celery.bin.celeryd_multi.multi_args(p, cmd='celeryd', append='', prefix='', suffix='')
celery.bin.celeryd_multi.parse_ns_range(ns, ranges=False)
celery.bin.celeryd_multi.quote(v)
celery.bin.celeryd_multi.say(m, newline=True)

Previous topic

caqmadm: AMQP API Command-line Shell - celery.bin.camqadm

Next topic

Internals

This Page