Skip to content

Update wait-for-psql.py#519

Open
kangkan10102001 wants to merge 1 commit intoodoo:masterfrom
kangkan10102001:master
Open

Update wait-for-psql.py#519
kangkan10102001 wants to merge 1 commit intoodoo:masterfrom
kangkan10102001:master

Conversation

@kangkan10102001
Copy link

In your original code, the following line prints the error if the database connection fails:
print("Database connection failure: %s" % error, file=sys.stderr)
This simply displays the error message stored in the error variable, but it doesn't give any indication of how long the script attempted to connect to the database before failing.
print(f"Database connection failure after {int(time.time() - start_time)} seconds: {error}", file=sys.stderr)

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.

1 participant