- 
                Notifications
    You must be signed in to change notification settings 
- Fork 84
Open
Description
I currently use wait-on for http but have to write something separate for other cases.
E.g. because mysql listens on it's port even when it's not ready to accept connections, i do something like this:
#!/usr/bin/env bash
set -e
i=0
while ! mysqladmin ping -h"$DB_HOST" --silent; do
	i=$((i+1))
	if [[ "$i" -gt '20' ]]; then
		echo "mysql failed to start"
		exit 1
	fi
	sleep 1
done
npx wait-on http://somehttpcheck But if wait-on supported a command resource i could do this:
npx wait-on http://somehttpcheck "command:mysqladmin ping -h$DB_HOST"I'm not sure command is the right naming but hopefully the intention is clear.
slavahatnuke
Metadata
Metadata
Assignees
Labels
No labels