docker icon indicating copy to clipboard operation
docker copied to clipboard

Update wait-for-psql.py

Open kangkan10102001 opened this issue 1 year ago • 0 comments

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)

kangkan10102001 avatar Sep 28 '24 14:09 kangkan10102001