Skip to content

Commit

Permalink
Merge pull request #35 from msp1974/dev
Browse files Browse the repository at this point in the history
Add connection pool info function
  • Loading branch information
msp1974 authored Oct 3, 2022
2 parents 790169f + b7f486d commit 0c887fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@ Documentation available in [info.md](https://github.com/msp1974/wiserHeatAPIv2/b
### 0.0.42

* Add connection close header
* Add debug connection pool logging
* Add connection pools function
* Remove UTF8 from content-type string
5 changes: 2 additions & 3 deletions wiserHeatAPIv2/rest_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ def _do_hub_action(self, action: WiserRestActionEnum, url: str, data: dict = Non
f"Connection error trying to communicate with Wiser Hub {self._wiser_connection.host}. Error is {ex}"
)

finally:
# Print out number of connections in pool
_LOGGER.debug(f"Hub Request Pool connections: {self._requests_session.get_adapter(url).poolmanager.pools}")
def get_connection_pools(self):
return self._requests_session.get_adapter(WISERHUBDOMAIN.format(self._wiser_connection.host)).poolmanager.pools

def _process_nok_response(self, response, raise_for_endpoint_error: bool = True):
if response.status_code == 401:
Expand Down

0 comments on commit 0c887fe

Please sign in to comment.