This document describes Celery 2.4. For development docs, 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.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= {'queue.declare': <celery.bin.camqadm.Spec object at 0x7fb4e8be9e10>, 'queue.purge': <celery.bin.camqadm.Spec object at 0x7fb4e8be9b10>, 'exchange.delete': <celery.bin.camqadm.Spec object at 0x7fb4ebc70190>, 'basic.publish': <celery.bin.camqadm.Spec object at 0x7fb4e8be9dd0>, 'basic.ack': <celery.bin.camqadm.Spec object at 0x7fb4e8be9850>, 'exchange.declare': <celery.bin.camqadm.Spec object at 0x7fb4ebd92050>, 'queue.delete': <celery.bin.camqadm.Spec object at 0x7fb4e8be9c90>, 'queue.bind': <celery.bin.camqadm.Spec object at 0x7fb4e8be9e90>, 'basic.get': <celery.bin.camqadm.Spec object at 0x7fb4e8be98d0>}
-
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)¶
-
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>¶
-
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
argsis [(“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)
- args – see
-
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)¶