Skip to content

Commit

Permalink
Revert "allow overriding vhost, user and password when connecting"
Browse files Browse the repository at this point in the history
This reverts commit 53864a6.
  • Loading branch information
cenkalti committed Oct 31, 2019
1 parent 9a62b9c commit f5de280
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kuyruk/kuyruk.py
Expand Up @@ -62,7 +62,7 @@ def channel(self) -> Iterator[amqp.Channel]:
yield ch

@contextmanager
def connection(self, vhost: str = None, user: str = None, password: str = None) -> Iterator[amqp.Connection]:
def connection(self) -> Iterator[amqp.Connection]:
"""Returns a new connection as a context manager."""
TCP_USER_TIMEOUT = 18 # constant is available on Python 3.6+.
socket_settings = {TCP_USER_TIMEOUT: self.config.TCP_USER_TIMEOUT}
Expand All @@ -72,9 +72,9 @@ def connection(self, vhost: str = None, user: str = None, password: str = None)

conn = amqp.Connection(
host="%s:%s" % (self.config.RABBIT_HOST, self.config.RABBIT_PORT),
userid=user or self.config.RABBIT_USER,
password=password or self.config.RABBIT_PASSWORD,
virtual_host=vhost or self.config.RABBIT_VIRTUAL_HOST,
userid=self.config.RABBIT_USER,
password=self.config.RABBIT_PASSWORD,
virtual_host=self.config.RABBIT_VIRTUAL_HOST,
connect_timeout=self.config.RABBIT_CONNECT_TIMEOUT,
read_timeout=self.config.RABBIT_READ_TIMEOUT,
write_timeout=self.config.RABBIT_WRITE_TIMEOUT,
Expand Down

0 comments on commit f5de280

Please sign in to comment.