This document describes the current stable version of Celery (4.2). 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¶
-
-P,--python¶ Force default Python shell.
-
-T,--without-tasks¶ Don’t add tasks to locals.
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= {'amqp': <class 'celery.bin.amqp.amqp'>, 'beat': <class 'celery.bin.beat.beat'>, 'call': <class 'celery.bin.call.call'>, 'control': <class 'celery.bin.control.control'>, 'events': <class 'celery.bin.events.events'>, 'graph': <class 'celery.bin.graph.graph'>, 'help': <class 'celery.bin.celery.help'>, 'inspect': <class 'celery.bin.control.inspect'>, 'list': <class 'celery.bin.list.list_'>, 'logtool': <class 'celery.bin.logtool.logtool'>, 'migrate': <class 'celery.bin.migrate.migrate'>, 'multi': <class 'celery.bin.celery.multi'>, 'purge': <class 'celery.bin.purge.purge'>, 'report': <class 'celery.bin.celery.report'>, 'result': <class 'celery.bin.result.result'>, 'shell': <class 'celery.bin.shell.shell'>, 'status': <class 'celery.bin.control.status'>, 'upgrade': <class 'celery.bin.upgrade.upgrade'>, 'worker': <class 'celery.bin.worker.worker'>}¶
-
enable_config_from_cmdline= True¶
-
execute_from_commandline(argv=None)[source]¶ Execute application from command-line.
Parameters: argv (List[str]) – The list of command-line arguments. Defaults to sys.argv.
-
ext_fmt= '{self.namespace}.commands'¶
-
handle_argv(prog_name, argv, **kwargs)[source]¶ Parse arguments from argv and dispatch to
run().Warning
Exits with an error message if
supports_argsis disabled andargvcontains positional arguments.Parameters: - prog_name (str) – The program name (
argv[0]). - argv (List[str]) – Rest of command-line arguments.
- prog_name (str) – The program name (
-
namespace= 'celery'¶
-
prog_name= 'celery'¶
-