Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete outdated appointment / trackers callback #41

Closed
sr-gi opened this issue Mar 11, 2022 · 2 comments
Closed

Delete outdated appointment / trackers callback #41

sr-gi opened this issue Mar 11, 2022 · 2 comments
Labels
discuss Topics were discussion is encouraged feature request New feature or request

Comments

@sr-gi
Copy link
Member

sr-gi commented Mar 11, 2022

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 sr-gi added feature request New feature or request discuss Topics were discussion is encouraged labels Mar 11, 2022
@sr-gi
Copy link
Member Author

sr-gi commented Sep 14, 2023

I think this was fixed by #190, wasn't it @mariocynicys?

@mariocynicys
Copy link
Collaborator

Indeed, we no longer have in-memory data for the watcher & responder that needs to be deleted.

Note: After #190, the Gatekeeper is placed first in the ChainMonitor's listeners list so it handles cascade deleting outdated users early before the Watcher or Responder process any of their appointments/trackers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Topics were discussion is encouraged feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants