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 :pypi:`iPython` implementation.

-B, --bpython

Force :pypi:`bpython` implementation.

-P, --python

Force default Python shell.

-T, --without-tasks

Don’t add tasks to locals.

--eventlet

Use :pypi:`eventlet` monkey patches.

--gevent

Use :pypi:`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).

Module Contents

Classes

multi() Start multiple worker instances.
help() Show help screen and exit.
report(self,*args,**kwargs) Shows information useful to include in bug-reports.
CeleryCommand() Base class for commands.

Functions

determine_exit_status(ret)
main(argv=None) Start celery umbrella command.
determine_exit_status(ret)
main(argv=None)

Start celery umbrella command.

class multi

Start multiple worker instances.

run_from_argv(prog_name, argv, command=None)
class help

Show help screen and exit.

usage(command)
run(*args, **kwargs)
class report(*args, **kwargs)

Shows information useful to include in bug-reports.

__init__(*args, **kwargs)

Custom initialization for report command.

We need this custom initialization to make sure that everything is loaded when running a report. There has been some issues when printing Django’s settings because Django is not properly setup when running the report.

run(*args, **kwargs)
class CeleryCommand

Base class for commands.

register_command(fun, name=None)
execute(command, argv=None)
on_usage_error(exc, command=None)
_relocate_args_from_start(argv, index=0)
prepare_prog_name(name)
handle_argv(prog_name, argv, **kwargs)
execute_from_commandline(argv=None)
get_command_info(command, indent=0, color=None, colored=None, app=None)
list_commands(indent=0, colored=None, app=None)
with_pool_option(argv)
on_concurrency_setup()
load_extension_commands()