A break statement is missed
seanzian2093 opened this issue · comments
SeanZ commented
In tika.py, line 685-696, after server is started and is_started is set to True, the while loop should stop; otherwise should log a warning, sleep and increase the try_count?
Check logs and retry as configured
try_count = 0
is_started = False
while try_count < TikaStartupMaxRetry:
with open(tika_log_file_path, "r") as tika_log_file_tmp:
# check for INFO string to confirm listening endpoint
if "Started Apache Tika server at" in tika_log_file_tmp.read():
is_started = True
# need a break here
# break
else:
log.warning("Failed to see startup log message; retrying...")
# time.sleep and try_cound += should be within the else block
# time.sleep(TikaStartupSleep)
# try_count +=1
time.sleep(TikaStartupSleep)
try_count += 1
Chris Mattmann commented
Fixed in #366 thanks @seanzian2093