This document describes Celery 2.4. For development docs, go here.
celery.bin.celeryd_multi¶
Examples¶
# Single worker with explicit name and events enabled.
$ celeryd-multi start Leslie -E
# Pidfiles and logfiles are stored in the current directory
# by default. Use --pidfile and --logfile argument to change
# this. The abbreviation %n will be expanded to the current
# node name.
$ celeryd-multi start Leslie -E --pidfile=/var/run/celery/%n.pid
--logfile=/var/log/celery/%n.log
# You need to add the same arguments when you restart,
# as these are not persisted anywhere.
$ celeryd-multi restart Leslie -E --pidfile=/var/run/celery/%n.pid
--logfile=/var/run/celery/%n.log
# To stop the node, you need to specify the same pidfile.
$ celeryd-multi stop Leslie --pidfile=/var/run/celery/%n.pid
# 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
# 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
# Additional options are added to each celeryd',
# but you can also modify the options for ranges of, or specific 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
(env=None, fh=None)¶ -
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¶
-
say
(msg)¶
-
show
(argv, cmd)¶
-
shutdown_nodes
(nodes, sig=15, retry=None, callback=None)¶
-
signal_node
(nodename, pid, sig)¶
-
splash
()¶
-
start
(argv, cmd)¶
-
stop
(argv, cmd)¶
-
stop_verify
(argv, cmd)¶
-
usage
()¶
-
waitexec
(argv, path='/home/docs/checkouts/readthedocs.org/user_builds/celery/envs/2.4-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)¶