Esempio n. 1
0
def main(argv):
    "Runs."
    channel = queue.get_channel()
    if len(argv) > 1:
        num_messages = int(argv[1])
    else:
        num_messages = 1
    logger.info("Sending %s message(s)", num_messages)
    for i in range(num_messages):
        queue.send(channel, "OH BOY")
Esempio n. 2
0
def main(argv):
    "Runs."
    channel = queue.get_channel()
    if len(argv) > 1:
        num_messages = int(argv[1])
    else:
        num_messages = 1
    logger.info('Sending %s message(s)', num_messages)
    for i in range(num_messages):
        queue.send(channel, 'OH BOY')
Esempio n. 3
0
def main(_):
    channel = queue.get_channel()
    queue.subscribe(channel, handler)
    channel.start_consuming()