This document describes an older version of Celery (2.2).
For the latest stable version please
go here.
celery.bin.camqadm
camqadm
-
class celery.bin.camqadm.AMQPAdmin(*args, **kwargs)
The celery camqadm utility.
-
connect(conn=None)
-
run()
-
say(m)
-
class celery.bin.camqadm.AMQPAdminCommand(app=None, get_app=None)
-
run(*args, **options)
-
class celery.bin.camqadm.AMQShell(*args, **kwargs)
AMQP API Shell.
Parameters: |
- connect – Function used to connect to the server, must return
connection object.
- silent – If True, the commands won’t have annoying
output not relevant when running in non-shell mode.
|
-
amqp
Mapping of AMQP API commands and their Spec.
-
amqp = {'queue.declare': <celery.bin.camqadm.Spec object at 0x49deb50>, 'queue.purge': <celery.bin.camqadm.Spec object at 0x53dfd50>, 'exchange.delete': <celery.bin.camqadm.Spec object at 0x53c00d0>, 'basic.publish': <celery.bin.camqadm.Spec object at 0x6f89ad0>, 'basic.ack': <celery.bin.camqadm.Spec object at 0x6f89ed0>, 'exchange.declare': <celery.bin.camqadm.Spec object at 0x53c01d0>, 'queue.delete': <celery.bin.camqadm.Spec object at 0x49de690>, 'queue.bind': <celery.bin.camqadm.Spec object at 0x49de2d0>, 'basic.get': <celery.bin.camqadm.Spec object at 0x4b3df50>}
-
builtins = {'exit': 'do_exit', 'EOF': 'do_exit', 'help': 'do_help'}
-
chan = None
-
completenames(text, *ignored)
Return all commands starting with text, for tab-completion.
-
conn = None
-
counter = 1
-
default(line)
-
dispatch(cmd, argline)
Dispatch and execute the command.
Lookup order is: builtins -> amqp.
-
display_command_help(cmd, short=False)
-
do_exit(*args)
The “exit” command.
-
do_help(*args)
-
get_amqp_api_command(cmd, arglist)
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: | tuple of (method, processed_args). |
Example:
>>> get_amqp_api_command("queue.delete", ["pobox", "yes", "no"])
(<bound method Channel.queue_delete of
<amqplib.client_0_8.channel.Channel object at 0x...>>,
('testfoo', True, False))
-
get_names()
-
identchars = '.'
-
inc_counter = <method-wrapper 'next' of itertools.count object at 0x4af0098>
-
needs_reconnect = False
-
onecmd(line)
Parse line and execute command.
-
parseline(line)
Parse input line.
Returns: | tuple of three items:
(command_name, arglist, original_line) |
E.g:
>>> parseline("queue.delete A 'B' C")
("queue.delete", "A 'B' C", "queue.delete A 'B' C")
-
prompt
-
prompt_fmt = '%d> '
-
respond(retval)
What to do with the return value of a command.
-
say(m)
Say something to the user. Disabled if silent.
-
class celery.bin.camqadm.Spec(*args, **kwargs)
AMQP Command specification.
Used to convert arguments to Python values and display various help
and tooltips.
Parameters: |
- args – see args.
- returns – see returns.
|
-
coerce(index, value)
Coerce value for argument at index.
E.g. if args is [(“is_active”, bool)]:
>>> coerce(0, "False")
False
-
format_arg(name, type, default_value=None)
-
format_response(response)
Format the return value of this command in a human-friendly way.
-
format_signature()
-
str_args_to_python(arglist)
Process list of string arguments to values according to spec.
e.g:
>>> spec = Spec([("queue", str), ("if_unused", bool)])
>>> spec.str_args_to_python("pobox", "true")
("pobox", True)
-
celery.bin.camqadm.camqadm(*args, **options)
-
celery.bin.camqadm.dump_message(message)
-
celery.bin.camqadm.format_declare_queue(ret)
-
celery.bin.camqadm.main()
-
celery.bin.camqadm.say(m)