Skip to main content

wait for postgres defined in django settings to be up

Project description

This command-line tool reads django settings, then tries to connect to configured postgresql server until connection succeeds. It is useful on service startup, when you want to launch migrations right after postgres database gets ready.

Installation

pip install pgwait

Usage

To wait before migrations:

pgwait && ./manage.py migrate

Specifying settings path

You can either set DJANGO_SETTINGS_MODULE environment variable, or specify settings module path in the first command-line argument.

pgwait path.to.settings

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pgwait-0.3-py3-none-any.whl (4.6 kB) Copy SHA256 hash SHA256 Wheel py3
pgwait-0.3.tar.gz (2.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page