MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / handle_exit

Function handle_exit

pager/PagerRagnar.py:214–232  ·  view source on GitHub ↗
(sig, frame, display_thread, ragnar_thread, web_thread=None)

Source from the content-addressed store, hash-verified

212
213
214def handle_exit(sig, frame, display_thread, ragnar_thread, web_thread=None):
215 from init_shared import shared_data
216 shared_data.should_exit = True
217 shared_data.orchestrator_should_exit = True
218 shared_data.display_should_exit = True
219 shared_data.webapp_should_exit = True
220
221 from pager_display import handle_exit_pager_display
222 display_inst = getattr(shared_data, 'display_instance', None)
223 handle_exit_pager_display(sig, frame, display_inst, exit_process=False)
224
225 if display_thread and display_thread.is_alive():
226 display_thread.join(timeout=5)
227 if ragnar_thread and ragnar_thread.is_alive():
228 ragnar_thread.join(timeout=5)
229 if web_thread and web_thread.is_alive():
230 web_thread.join(timeout=5)
231 logger.info("Clean exit.")
232 sys.exit(0)
233
234
235if __name__ == "__main__":

Callers 1

PagerRagnar.pyFile · 0.70

Calls 3

infoMethod · 0.80
exitMethod · 0.80

Tested by

no test coverage detected