airtai / faststream

FastStream is a powerful and easy-to-use Python framework for building asynchronous services interacting with event streams such as Apache Kafka, RabbitMQ, NATS and Redis.
https://faststream.airt.ai/latest/
Apache License 2.0
2.5k stars 128 forks source link

Feature: Add a "ready" subcommand. #1534

Closed brunns closed 3 months ago

brunns commented 3 months ago

Is your feature request related to a problem? Please describe.

I'm starting a containerised faststream application via a docker-compose.yml file, with some other services depending on the faststream application.

For all my other services, I'm able to define a health check, which I have found greatly improves the reliability of my tests.

Where it's easy to build http endpoints into our application, that's an obvious route to go, but several services instead include a cli command to confirm that the service is running and healthy - PostgreSQL's pg_isready, for example, or MinIO's ready. It would be great if faststream had such a command line subcommand.

Describe the solution you'd like

I cli subcommand, of the form faststream ready app:app, which would return a status code of zero if the service is up and running, and non-zero otherwise.

Feature code example

faststream ready app:app
Lancetnik commented 3 months ago

It is srtongly related to #1181 and we are already working on it. Can we close this Issue as a copy?

brunns commented 3 months ago

Absolutely, thanks.

Closed as duplicate of #1181.