human-essentials
human-essentials copied to clipboard
Event Sourcing - Next Steps
Summary
- Add a method to validate current inventory against event sourced inventory.
- Whenever an event is being created, validate it.
- If a validation fails, add a yellow notice to the UI indicating the discrepancy.
- Create an
inventory_discrepanciestable. - If there is a discrepancy between the event sourcing calculation of current inventory and the DB, add a log to to the table including the diff as well as the user e-mail, controller action and parameters which caused it.
- We should audit this table at least once a week and figure out what to do with the discrepancies.
- We should add a button to the superadmin UI to resync a single organization or all organizations.
- We should update the logic to build inventory by only starting from the most recent SnapshotEvent.
Things to consider
No response
Criteria for Completion
No response
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.
Automatically unassigned after 7 days of inactivity.
We're tracking this outside of the issues now, so I'm closing this.