I'm currently writing a Python application that involves starting several background processes. There are several websockets and the remaining are health checks. I start these in the background by queuing them into Celery.
My question is regarding what the "main" function in my program should be doing in this case. It is currently just spawns all of the background processes. Some ideas I've had: it could run one of the background processes; it could execute some kind of health check on each of the background processes.
Is there a consensus on what the best practice for what the main function should do in a multi-process/multi-threaded application? (Apologies if I used process/thread incorrectly).
Aucun commentaire:
Enregistrer un commentaire