| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
| docs | |
|---|---|
| tests | |
| package |
A tool to wait for services and execute command. Useful for Docker containers that depend on slow to start services (like almost everything).
Currently holdup is only published to PyPI and hub.docker.com.
To install from PyPI:
pip install holdup
It has no dependencies except the optional PostgreSQL check support, which you'd install with:
pip install 'holdup[pg]'
You can also install the in-development version with:
pip install https://github.com/ionelmc/python-holdup/archive/master.zip
Example:
docker run --rm ionelmc/holdup tcp://foobar:1234
Note that this will have some limitations:
usage: holdup [-h] [-t SECONDS] [-T SECONDS] [-i SECONDS] [-n] service [service ...] [-- command [arg [arg ...]]]
Wait for services to be ready and optionally exec command.
| -h, --help | show this help message and exit |
| -t SECONDS, --timeout SECONDS | |
| Time to wait for services to be ready. Default: 60.0 | |
| -T SECONDS, --check-timeout SECONDS | |
| Time to wait for a single check. Default: 1.0 | |
| -i SECONDS, --interval SECONDS | |
| How often to check. Default: 0.2 | |
| -v, --verbose | Verbose mode. |
| --verbose-passwords | |
| Disable PostgreSQL/HTTP password masking. | |
| -n, --no-abort | Ignore failed services. This makes holdup return 0 exit code regardless of services actually responding. |
| --insecure | Disable SSL Certificate verification for HTTPS services. |
| --version | display the version of the holdup package and its location, then exit. |
Example:
holdup tcp://foobar:1234 -- django-admin ...
https://python-holdup.readthedocs.io/
To run all the tests run:
tox
Note, to combine the coverage data from all the tox environments run:
| Windows | set PYTEST_ADDOPTS=--cov-append tox |
|---|---|
| Other | PYTEST_ADDOPTS=--cov-append tox |
| Back | FazBrowse Home | New Git URL |