rust-teos icon indicating copy to clipboard operation
rust-teos copied to clipboard

Delete outdated appointment / trackers callback

Open sr-gi opened this issue 2 years ago • 0 comments

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.

sr-gi avatar Mar 11 '22 12:03 sr-gi