rust-teos
rust-teos copied to clipboard
Delete outdated appointment / trackers callback
When a user is outdated by the Gatekeeper
, the data stored by him is deleted alongside with the associated database data. This triggers a cascade deletion in the database that also removes all associated data from the appointments
and trackers
tables. However, the in-memory data cleaning in the Watcher
and the Responder
is not triggered by this. Instead, both components do query the Gatekeeper
to get a list of what needs to be deleted.
This seems better suited to be done as a callback by the Gatekeeper
. See how can we redesign the code to fit it (if we actually can).
Note: This is why the Gatekeeper
is placed last in the ChainMonitor
's listeners list, so the queries can be performed before the data is wiped.