INNER CODE UNIT · Python
print_memory_updates
shakedzy/companion · companion.py:425
def print_memory_updates():
"""
Helper endpoint for debugging. Print memory updates.
"""
return json.dumps(memory.updates, indent=4)
def exit_graceful(signum, frame) -> None:
"""
Stop threads when app terminates.
:param signum: required by `signal.signal`
:param frame: required by `signal.signal`
"""
app_cache.stop_threads_event.set()
if app_cache.text2speech_thread is not None:
app_cache.text2speech_thread.join()
sys.exit(0)