Sloppy commit. Both re-namespacing and using the amqp uri env var.
This commit is contained in:
parent
4c78d5d148
commit
f950fcd318
@ -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):
|
@ -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):
|
@ -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[:]):
|
@ -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[:]):
|
Loading…
Reference in New Issue
Block a user