Skip to content

Commit 92b295f

Browse files
author
Logan Sulpizio
committed
fix script stopped by user with ctrl-c
1 parent 433515e commit 92b295f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

yam_indexing_module/main_indexing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def main_indexing():
131131
except KeyboardInterrupt:
132132
logger.info("Received Ctrl+C, shutting down the indexing service...")
133133
print("Process stopped by user")
134+
raise
134135
except Exception as e:
135136
logger.error(f"Indexing loop failed with error: {str(e)}", exc_info=True)
136137
print(f"Indexing loop failed with error: {str(e)}")
@@ -139,6 +140,8 @@ def main_indexing():
139140
while True:
140141
try:
141142
main_indexing()
143+
except KeyboardInterrupt:
144+
break
142145
except Exception as e:
143146
logger = logging.getLogger(__name__)
144147
logger.exception("Fatal error in main_indexing. Restarting in 30 seconds...")

0 commit comments

Comments
 (0)