Skip to content

Commit

Permalink
Version 1.1: Fix unified amqp envvars
Browse files Browse the repository at this point in the history
  • Loading branch information
Robikos committed Jan 11, 2023
1 parent e391b41 commit 1b1a4cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pikachu/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ def _set_dlx(channel, queue_config, queue_prefix, queue_name):

@staticmethod
def _build_url():
scheme = AMQPClient._resolve_scheme(environ["MESSAGING_AMQP_PORT"])
username = environ["MESSAGING_AMQP_USERNAME"]
password = environ["MESSAGING_AMQP_PASSWORD"]
scheme = AMQPClient._resolve_scheme(environ["AMQP_PORT"])
username = environ["AMQP_USERNAME"]
password = environ["AMQP_PASSWORD"]
authentication_credentials = f"{username}:{password}"
host = environ["MESSAGING_AMQP_HOST"]
virtual_host = environ["MESSAGING_AMQP_VIRTUAL_HOST"]
host = environ["AMQP_HOST"]
virtual_host = environ["AMQP_VIRTUAL_HOST"]

return f"{scheme}://{authentication_credentials}@{host}{virtual_host}"

Expand Down Expand Up @@ -160,7 +160,7 @@ def from_config():

with open("amqp-config.yml", "r") as f:
config = yaml.safe_load(f)
queue_prefix = environ["MESSAGING_AMQP_QUEUE_PREFIX"]
queue_prefix = environ["AMQP_QUEUE_PREFIX"]

consumer_configs = config["consumers"]
consumers = [
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="pikachu",
version="1.0",
version="1.1",
author="Maciej Gruszczyński",
author_email="maciejgruszczysnki@surferseo.com",
description="Wrapper around pika inspired by lapin for convenient AMQP operations in Python APIs",
Expand Down

0 comments on commit 1b1a4cb

Please sign in to comment.