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

Method _background_decrypt

auth_manager.py:483–495  ·  view source on GitHub ↗

Decrypt DB and reinitialize in a background thread.

(self)

Source from the content-addressed store, hash-verified

481 return {'success': False, 'error': f'Login failed: {str(e)}'}
482
483 def _background_decrypt(self):
484 """Decrypt DB and reinitialize in a background thread."""
485 try:
486 logger.info("Background DB decryption starting...")
487 self._close_db()
488 time.sleep(0.2)
489 self.decrypt_database()
490 self._reinit_db()
491 self._db_ready = True
492 logger.info("Background DB decryption complete - DB ready")
493 except Exception as e:
494 logger.error(f"Background decrypt failed: {e}")
495 self._db_ready = True # Mark ready anyway so the system isn't stuck
496
497 def logout(self) -> dict:
498 """Encrypt database and clear session data."""

Callers

nothing calls this directly

Calls 6

_close_dbMethod · 0.95
decrypt_databaseMethod · 0.95
_reinit_dbMethod · 0.95
infoMethod · 0.80
errorMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected