I have a process running every night and doing lot of data analysis for a set of companies . I am doing this just in a for loop that runs through company list . Sometimes It takes about 1 hour for this process to completed . Sometimes cause of some errors it crashes in between causing . I have to manually restart it and it processes all remaining company’s analysis .
Since each for loop run’s a separate company’s data analysis should multithreading inside for loop be a good solution?
Thanks for any suggestions.
ThreadPoolExecutor is your friend!