-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
honour connect_timeout and PGCONNECT_TIMEOUT
The wait_select callback previously installed to enable Ctrl+C during long queries was breaking configurable connection timeout : psycopg/psycopg2#944 This was replaced with a more visible async connection and a manual call to a custom wait_select with support for timeout. The timeout mimics default libpq behavior and reads the connect_timeout connection parameter with a fallback on PGCONNECT_TIMEOUT environment variable (and a default of 0: no timeout). A secondary benefit is to allow importing PGMigrate inside another project without PGMigrate altering the global set_wait_callback.
- Loading branch information
1 parent
8e3a4db
commit 3b54930
Showing
3 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters