I have a program which starts from a python script called daemon.py, and this daemon script starts up 4 threads that are alive the whole time the program is running.
I want to use the initial daemon program as a watchdog for the other threads. I'm thinking that each thread will have its own time in the sqlite database and the daemon will count it down. Its the threads job to reset its own timer. If any of the timers make it to 0, the daemon will restart everything.
Is this a good way of doing this? if not how should I go about it?