This document describes the current stable version of Celery (4.4). For development docs, go here.
celery.bin.amqp
¶
The celery amqp command.
-
class
celery.bin.amqp.
AMQShell
(*args, **kwargs)[source]¶ AMQP API Shell.
- Parameters
connect (Callable) – Function used to connect to the server. Must return
kombu.Connection
object.silent (bool) – If enabled, the commands won’t have annoying output not relevant when running in non-shell mode.
-
amqp
= {'basic.ack': <celery.bin.amqp.Spec object>, 'basic.get': <celery.bin.amqp.Spec object>, 'basic.publish': <celery.bin.amqp.Spec object>, 'exchange.declare': <celery.bin.amqp.Spec object>, 'exchange.delete': <celery.bin.amqp.Spec object>, 'queue.bind': <celery.bin.amqp.Spec object>, 'queue.declare': <celery.bin.amqp.Spec object>, 'queue.delete': <celery.bin.amqp.Spec object>, 'queue.purge': <celery.bin.amqp.Spec object>}¶ Map of AMQP API commands and their
Spec
.
-
builtins
= {'EOF': 'do_exit', 'exit': 'do_exit', 'help': 'do_help'}¶ Map of built-in command names -> method names
-
chan
= None¶
-
conn
= None¶
-
counter
= 1¶
-
default
(line)[source]¶ Called on an input line when the command prefix is not recognized.
If this method is not overridden, it prints an error message and returns.
-
get_amqp_api_command
(cmd, arglist)[source]¶ Get AMQP command wrapper.
With a command name and a list of arguments, convert the arguments to Python values and find the corresponding method on the AMQP channel object.
- Returns
of (method, processed_args) pairs.
- Return type
Tuple
-
identchars
= '.'¶
-
inc_counter
= count(2)¶
-
needs_reconnect
= False¶
-
parseline
(parts)[source]¶ Parse input line.
- Returns
- of three items:
(command_name, arglist, original_line)
- Return type
Tuple
-
property
prompt
¶ str(object=’‘) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
-
prompt_fmt
= '{self.counter}> '¶
-
class
celery.bin.amqp.
Spec
(*args, **kwargs)[source]¶ AMQP Command specification.
Used to convert arguments to Python values and display various help and tool-tips.
-
args
= None¶ List of arguments this command takes. Should contain
(argument_name, argument_type)
tuples.
-
returns
= None¶ Helpful human string representation of what this command returns. May be
None
, to signify the return type is unknown.
-
-
class
celery.bin.amqp.
amqp
(app=None, get_app=None, no_color=False, stdout=None, stderr=None, quiet=False, on_error=None, on_usage_error=None)[source]¶ AMQP Administration Shell.
Also works for non-AMQP transports (but not ones that store declarations in memory).
Examples
$ # start shell mode $ celery amqp $ # show list of commands $ celery amqp help $ celery amqp exchange.delete name $ celery amqp queue.delete queue $ celery amqp queue.delete queue yes yes