Skip to content

Commit

Permalink
Update connection.py
Browse files Browse the repository at this point in the history
Based on my headaches with silent revert to `localhost` I submit this PR.
The developer should be notified if their host settings are not found.
Details on the issue are here: celery/celery#6661
  • Loading branch information
Krogsager committed Mar 11, 2021
1 parent 39ccacf commit b528d57
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kombu/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,12 @@ def _info(self, resolve=True):
transport_cls, transport_cls)
D = self.transport.default_connection_params

hostname = self.hostname or D.get('hostname')
if not self.hostname:
logger.warning(f"No hostname was supplied. Reverting to default '{D.get('hostname')}'")
hostname = D.get('hostname')
else:
hostname = self.hostname

if self.uri_prefix:
hostname = f'{self.uri_prefix}+{hostname}'

Expand Down

0 comments on commit b528d57

Please sign in to comment.