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

Method _reinit_db

auth_manager.py:895–904  ·  view source on GitHub ↗

Reinitialize the database connection after decryption.

(self)

Source from the content-addressed store, hash-verified

893 logger.error(f"Failed to close DB: {e}")
894
895 def _reinit_db(self):
896 """Reinitialize the database connection after decryption."""
897 try:
898 from db_manager import reinit_db
899 self.shared_data.db = reinit_db(currentdir=getattr(self.shared_data, 'currentdir', None))
900 # Re-apply network storage context if it was set during startup
901 if hasattr(self.shared_data, '_configure_database'):
902 self.shared_data._configure_database()
903 except Exception as e:
904 logger.error(f"Failed to reinitialize DB: {e}")
905
906 def is_db_available(self) -> bool:
907 """Check if the main database is available (decrypted)."""

Callers 1

_background_decryptMethod · 0.95

Calls 3

reinit_dbFunction · 0.90
_configure_databaseMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected