https://github.com/mdegans/wait_for_connection
https://github.com/mdegans/wait_for_connection
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mdegans/wait_for_connection
- Owner: mdegans
- Created: 2021-08-12T20:59:06.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T21:20:04.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T11:52:18.140Z (4 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `wait_for_connection.py`
[](https://codecov.io/gh/mdegans/wait_for_connection)
Waits `--timeout` seconds for `--urls` before returning the number of failed
urls in the returncode. -1 is returned if the failed urls are greater than 126.
-2 is returned on invalid url. -3 is returned on any unexpected error.Usage:
```
usage: wait_for_connection.py [-h] [--timeout TIMEOUT] [--urls [URLS [URLS ...]]] [-v] [--threads THREADS]Waits for a connection for `--timeout` seconds
optional arguments:
-h, --help show this help message and exit
--timeout TIMEOUT before returning the number of inaccessable urls (default: 30.0)
--urls [URLS [URLS ...]]
to wait on in parallel (default: ('https://google.com/', 'http://archive.raspberrypi.org/debian', 'http://raspbian.raspberrypi.org/raspbian'))
-v, --verbose
--threads THREADS size of thread pool (default is number of `--urls`) (default: None)
```