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.

Source Distribution

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

Uploaded source

Built Distribution

pgwait-0.3-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page