A tool to wait for services and execute command. Useful for Docker containers that depend on slow to start services (like almost everything).
Project description
A tool to wait for services and execute command. Useful for Docker containers that depend on slow to start services (like almost everything).
- Free software: BSD license
Installation
pip install holdup
Documentation
Usage: holdup [-h] [-t SECONDS] [-i SECONDS] [-n] service [service ...] [-- command [arg [arg ...]]]
Wait for services to be ready and optionally exec command.
- positional arguments:
- service A service to wait for. Supported protocols: “tcp://host:port/”, “unix:///path/to/domain.sock”. command An optional command to exec.
- optional arguments:
-h, --help Show this help message and exit. -t SECONDS, --timeout SECONDS Time to wait for services to be ready. Default: 5.0 -i SECONDS, --interval SECONDS How often to check. Default: 0.2 -n, --no-abort Ignore failed services. This makes holdup return 0 exit code regardless of services actually responding.
Development
To run the all 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 |
Changelog
1.2.1 (2016-06-17)
- Handle situation where internal operations would take more than planned.
1.2.0 (2016-05-25)
- Added a file check.
1.1.0 (2016-05-06)
- Removed debug print.
- Added --interval option for how often to check. No more spinloops.
1.0.0 (2016-04-22)
- Improved tests.
- Always log to stderr.
0.1.0 (2016-04-21)
- First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size holdup-1.2.1-py2.py3-none-any.whl (6.8 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size holdup-1.2.1.tar.gz (15.5 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for holdup-1.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 841fad094353076814c233a31169f85e9651e19c04bc6c7be8497b654cb96f0f |
|
MD5 | ed97b582d9f7a61cff0ea6b484a49cf4 |
|
BLAKE2-256 | 7f03d95c257d26cdd6d5dcd6ff83d250be3d41e5824d3e0c154c985bcd85d2cd |