Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak get_connection_info() and keepalive_expiry behaviour. #137

Merged
merged 2 commits into from
Aug 7, 2020

Conversation

tomchristie
Copy link
Member

@tomchristie tomchristie commented Aug 6, 2020

There are two changes here...

stats = pool.get_connection_info()

Instead becomes...

stats = await pool.get_connection_info()

This is important because it allows us to run a keep-alive expiry sweep before returning the connection info, so you'll be seeing more valid information.

Secondly, we were previously capping our keep-alive expiry checks to at most once per second. Now if keepalive_expiry is set, and is less than 1.0, then we'll check for expiry more frequently than once per second. In particular this ensures that keepalive_expiry=0.0 functions as expected.

Note that .get_connection_info() is only introduced from 0.10 onwards, so this is an addition, not a breaking change.

@tomchristie tomchristie changed the title Tweak get_connection_info and keepalive_expiry behaviour. Tweak get_connection_info() and keepalive_expiry behaviour. Aug 6, 2020
@tomchristie tomchristie added the enhancement New feature or request label Aug 6, 2020
@tomchristie tomchristie added this to the 0.10.0 milestone Aug 6, 2020
@tomchristie tomchristie merged commit 53718de into master Aug 7, 2020
@tomchristie tomchristie deleted the get_connection_info_and_keep_alive_tweaks branch August 7, 2020 12:27
@tomchristie tomchristie mentioned this pull request Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant