I want to run the Worker class from my code. There's a docstring on the class explaining how to do it. It looks to be outdated, though, as there's no stop_and_shutdown_loop method on the worker anymore.
If I'm reading the code correctly, the Worker will register signal handlers on start, so there's no need for any cleanup in finally, right?
P.S. I'm running Worker from my own code, so that I can retry connecting to Kafka a couple of times. While I'm starting up my containers with Docker Compose, Kafka might need some time to set up, and my app needs to wait for it.
I want to run the
Workerclass from my code. There's a docstring on the class explaining how to do it. It looks to be outdated, though, as there's nostop_and_shutdown_loopmethod on the worker anymore.If I'm reading the code correctly, the Worker will register signal handlers on start, so there's no need for any cleanup in
finally, right?P.S. I'm running
Workerfrom my own code, so that I can retry connecting to Kafka a couple of times. While I'm starting up my containers with Docker Compose, Kafka might need some time to set up, and my app needs to wait for it.