Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrh committed Feb 24, 2019
2 parents a6b5eb5 + 74de703 commit 7e37b4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dockerctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import docker


__version__ = '2018.3.1'
__version__ = '2018.11.1'
__all__ = ['new_container']
logger = logging.getLogger('dockerctx')

Expand Down Expand Up @@ -114,7 +114,7 @@ def accepting_connections(host, port, timeout=20):
return False


def pg_ready(host, port, dbuser='postgres', dbname='postgres',
def pg_ready(host, port, dbuser='postgres', dbpass='password', dbname='postgres',
timeout=20, poll_freq=0.2):
"""Wait until a postgres instance is ready to receive connections.
Expand All @@ -132,7 +132,7 @@ def pg_ready(host, port, dbuser='postgres', dbname='postgres',
while time.time() - t0 < timeout:
try:
conn = psycopg2.connect(
"host={host} port={port} user={dbuser} "
"host={host} port={port} user={dbuser} password={dbpass} "
"dbname={dbname}".format(**vars())
)
logger.debug('Connected successfully.')
Expand Down

0 comments on commit 7e37b4d

Please sign in to comment.