Sloppy commit. Both re-namespacing and using the amqp uri env var.

This commit is contained in:
Dan Buch 2012-11-17 08:25:15 -05:00
parent 4c78d5d148
commit f950fcd318
5 changed files with 6 additions and 5 deletions

View File

@ -1,9 +1,10 @@
import os
import pika
def get_conn_params():
credentials = pika.PlainCredentials('guest', 'guest')
return pika.ConnectionParameters('localhost', credentials=credentials)
return pika.URLParameters(os.environ['SYLVILAGUS_AMQP_URI'])
def get_nonblocking_channel(declare_exchange=True):

View File

@ -4,7 +4,7 @@ import sys
import pika
from sylvilagus.chapter02 import hello_world
from sylvilagus.ch02 import hello_world
def msg_consumer(channel, method, header, body):

View File

@ -4,7 +4,7 @@ import sys
import pika
from sylvilagus.chapter02 import hello_world
from sylvilagus.ch02 import hello_world
def main(args=sys.argv[:]):

View File

@ -5,7 +5,7 @@ import sys
import pika
from sylvilagus.chapter02 import hello_world
from sylvilagus.ch02 import hello_world
def main(sysargs=sys.argv[:]):