Integrate MasteryPersistence into Mastery
Now, it’s time to finish up the integration. First, let’s think about what needs to happen for Mastery to work with our tiny external persistence project. We’ll specify the dependency and modify QuizSession.answer_question to take an extra configurable function, one that will actually persist a response. Here’s our checklist:
- Configure the project to use a repository.
- Add a perstence function to our external API.
- Wire that persistence function into the Boundary.QuizSession GenServer.
It’s going to go quickly. Let’s do the configuration first.
Configure Mastery for Persistence
The first step of our integration is adding the repository to our configuration. To us, the repository is just an external GenServer ...