Data storage - Don't recreate DB if its corrupt, exit with error cleanly so operator can look into the problem (#1296)

This commit is contained in:
dgtlmoon
2023-01-08 14:47:31 +01:00
committed by GitHub
parent 58c7cbeac7
commit fab7d325f7
3 changed files with 20 additions and 7 deletions

View File

@@ -7,7 +7,7 @@
from changedetectionio import changedetection
import multiprocessing
import signal
import sys
import os
def sigchld_handler(_signo, _stack_frame):
@@ -35,6 +35,9 @@ if __name__ == '__main__':
try:
while True:
time.sleep(1)
if not parse_process.is_alive():
# Process died/crashed for some reason, exit with error set
sys.exit(1)
except KeyboardInterrupt:
#parse_process.terminate() not needed, because this process will issue it to the sub-process anyway