This document describes the current stable version of Celery (4.0). For development docs, go here.

celery.bin.celery

The celery umbrella command.

Preload Options

These options are supported by all commands, and usually parsed before command-specific arguments.

-A, --app

app instance to use (e.g., module.attr_name)

-b, --broker

URL to broker. default is amqp://guest@localhost//

--loader

name of custom loader class to use.

--config

Name of the configuration module

-C, --no-color

Disable colors in output.

-q, --quiet

Give less verbose output (behavior depends on the sub command).

--help

Show help and exit.

Daemon Options

These options are supported by commands that can detach into the background (daemon). They will be present in any command that also has a –detach option.

-f, --logfile

Path to log file. If no logfile is specified, stderr is used.

--pidfile

Optional file used to store the process pid.

The program won’t start if this file already exists and the pid is still alive.

--uid

User id, or user name of the user to run as after detaching.

--gid

Group id, or group name of the main group to change to after detaching.

--umask

Effective umask (in octal) of the process after detaching. Inherits the umask of the parent process by default.

--workdir

Optional directory to change to after detaching.

--executable

Executable to use for the detached process.

celery inspect

-t, --timeout

Timeout in seconds (float) waiting for reply

-d, --destination

Comma separated list of destination node names.

-j, --json

Use json as output format.

celery control

-t, --timeout

Timeout in seconds (float) waiting for reply

-d, --destination

Comma separated list of destination node names.

-j, --json

Use json as output format.

celery migrate

-n, --limit

Number of tasks to consume (int).

-t, -timeout

Timeout in seconds (float) waiting for tasks.

-a, --ack-messages

Ack messages from source broker.

-T, --tasks

List of task names to filter on.

-Q, --queues

List of queues to migrate.

-F, --forever

Continually migrate tasks until killed.

celery upgrade

--django

Upgrade a Django project.

--compat

Maintain backwards compatibility.

--no-backup

Don’t backup original files.

celery shell

-I, --ipython

Force iPython implementation.

-B, --bpython

Force bpython implementation.

-P, --python

Force default Python shell.

-T, --without-tasks

Don’t add tasks to locals.

--eventlet

Use eventlet monkey patches.

--gevent

Use gevent monkey patches.

celery result

-t, --task

Name of task (if custom backend).

--traceback

Show traceback if any.

celery purge

-f, --force

Don’t prompt for verification before deleting messages (DANGEROUS)

celery call

-a, --args

Positional arguments (json format).

-k, --kwargs

Keyword arguments (json format).

--eta

Scheduled time in ISO-8601 format.

--countdown

ETA in seconds from now (float/int).

--expires

Expiry time in float/int seconds, or a ISO-8601 date.

--serializer

Specify serializer to use (default is json).

--queue

Destination queue.

--exchange

Destination exchange (defaults to the queue exchange).

--routing-key

Destination routing key (defaults to the queue routing key).

class celery.bin.celery.CeleryCommand(app=None, get_app=None, no_color=False, stdout=None, stderr=None, quiet=False, on_error=None, on_usage_error=None)[source]

Base class for commands.

commands = {u'control': <class 'celery.bin.control.control'>, u'status': <class 'celery.bin.control.status'>, u'multi': <class 'celery.bin.celery.multi'>, u'logtool': <class 'celery.bin.logtool.logtool'>, u'amqp': <class 'celery.bin.amqp.amqp'>, u'beat': <class 'celery.bin.beat.beat'>, u'graph': <class 'celery.bin.graph.graph'>, u'inspect': <class 'celery.bin.control.inspect'>, u'list': <class 'celery.bin.list.list_'>, u'purge': <class 'celery.bin.purge.purge'>, u'migrate': <class 'celery.bin.migrate.migrate'>, u'shell': <class 'celery.bin.shell.shell'>, u'call': <class 'celery.bin.call.call'>, u'result': <class 'celery.bin.result.result'>, u'report': <class 'celery.bin.celery.report'>, u'worker': <class 'celery.bin.worker.worker'>, u'upgrade': <class 'celery.bin.upgrade.upgrade'>, u'events': <class 'celery.bin.events.events'>, u'help': <class 'celery.bin.celery.help'>}
enable_config_from_cmdline = True
execute(command, argv=None)[source]
execute_from_commandline(argv=None)[source]
ext_fmt = u'{self.namespace}.commands'
classmethod get_command_info(command, indent=0, color=None, colored=None, app=None)[source]
handle_argv(prog_name, argv, **kwargs)[source]
classmethod list_commands(indent=0, colored=None, app=None)[source]
load_extension_commands()[source]
namespace = u'celery'
on_concurrency_setup()[source]
on_usage_error(exc, command=None)[source]
prepare_prog_name(name)[source]
prog_name = u'celery'
classmethod register_command(fun, name=None)[source]
with_pool_option(argv)[source]
celery.bin.celery.main(argv=None)[source]

Start celery umbrella command.