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.

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.

Source Distribution

pgwait-0.2.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

pgwait-0.2-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page