I am working on some project where I have dependency from websocket data. And sometimes the sessions gets expired from the other side of the API. This is how how my thread is declared.
streaming_thread = threading.Thread(target=stream_live_load)
streaming_thread.start()
I just want to know how can I use the thread ID/Number to restart when the thread dies and restart the above again on loop until I kill it specifically.