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

Add db reconnect logic #1242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add db reconnect logic #1242

wants to merge 2 commits into from

Conversation

tias77
Copy link

@tias77 tias77 commented Mar 23, 2020

When running NIPAP with docker complose, the database is a bit of a slow starter.
This PR adds logic for nipapd to retry connecting to db.

Mathias Wolkert and others added 2 commits March 22, 2020 09:09
@@ -786,6 +786,12 @@ def _connect_db(self):
self._db_install(db_args['database'])
continue
raise NipapDatabaseMissingExtensionError("hstore extension not found in the database")
# retry if database is not ready (docker friendly)
if re.search("could not connect to server: Connection refused", unicode(exc)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'unicode' may be undefined, or defined from star imports: errors
line too long (94 > 79 characters)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants