wait_for_port
Blocks until a specified port accepts connections to confirm a server or database is ready, or until it is free when free mode is set; returns promptly or fails after the timeout.
Instructions
Wait until a port accepts connections, e.g. until a server or database has finished starting, or with free=true until a port is free again. Returns as soon as it's ready, or fails after timeout_seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| free | No | wait until the port is free instead of open | |
| host | No | host (default localhost) | |
| port | Yes | the port to wait for | |
| timeout_seconds | No | give up after this many seconds (default 30, at most 300) |