I am working on a local windows web application.
I am running a RabbitMQ service and I have a python script that needs to run on the background, and consume messages from the queue (for example, using pika's basic_consume()
function).
The question is - how should the program run on the backgroud. Some options:
- using pythonw.exe
- running the script as a service
- running an IIS site
I need the code to rerun if it fails and have a simple control of stoping and restarting it. What's the best practice?