镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Update wait-for-psql.py - #519

Open
Kangkanpatowary wants to merge 1 commit into
odoo:masterfrom
Kangkanpatowary:master
Open

Kangkanpatowary wants to merge 1 commit into
odoo:masterfrom
Kangkanpatowary:master

Conversation

@Kangkanpatowary

Copy link
Copy Markdown

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