[rabbitmq-discuss] pika error - need a help
Sergey Almazov
sergey.almazoff at gmail.com
Wed Sep 7 06:39:59 BST 2011
#!/usr/bin/env python
import pika
import sys
import psutil
import json
import time
serverName = "salmazov"
connection =
pika.AsyncoreConnection(pika.ConnectionParameters(host='192.168.0.25'))
channel = connection.channel()
channel.exchange_declare(exchange='cmd', type='topic')
cmd_data_queue = channel.queue_declare(exclusive=True).queue
channel.queue_bind(exchange='cmd', queue=cmd_data_queue,
routing_key='cmd.*')
def callback(ch, method, properties, body):
print " [x] %r:%r" % (method.routing_key, body,)
procCmd = decodeddict["ProcCmd"]
proc = psutil.Popen(procCmd)
channel.basic_consume(callback, queue=cmd_data_queue, no_ack=True)
pika.asyncore_loop()
--------------------------------------------
When I start this code -> have an error: *error: uncaptured python
exception, closing channel <pika.asyncore_adapter.RabbitDispatcher connected
at 0x12ad6c0>*
*
*
I need to run processes that arrived via RmQ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110907/4750ee1e/attachment.htm>
More information about the rabbitmq-discuss
mailing list