I am trying to read many log files stored across multiple servers as part of log monitoring. usually the process takes 30-60 seconds to finish a monitoring cycle time, but if there is any issue with particular server the server log file reading takes longer than expected.
I want my program to send an alert if a particular server log file is unreadable for certain time frame and process the next one.
What approach should I take? so that the following lines cab be skipped if it takes more than the specified intervall?
What I have tried:
with open(logServerFilename, 'r') as content_file: