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

Use trigger to schedule upload data deletion #787

Closed
zkat opened this issue Feb 18, 2024 · 0 comments · Fixed by #788
Closed

Use trigger to schedule upload data deletion #787

zkat opened this issue Feb 18, 2024 · 0 comments · Fixed by #788
Assignees
Labels
technical improvement General technical improvements that might not be user-visible or affect the overall site experience.

Comments

@zkat
Copy link
Contributor

zkat commented Feb 18, 2024

Right now, we do this manually in every delete function. This really isn't gonna scale, esp with delete constraints.

Instead, create a trigger that will fire every time an upload row gets deleted, and have a GenServer listen for that event and schedule the deletion with UploadDeleter.

See https://peterullrich.com/listen-to-database-changes-with-postgres-triggers-and-elixir

@zkat zkat added the technical improvement General technical improvements that might not be user-visible or affect the overall site experience. label Feb 18, 2024
@zkat zkat self-assigned this Feb 18, 2024
@zkat zkat moved this from 🆕 New to 📋 Backlog in Banchan Project Roadmap Feb 18, 2024
@zkat zkat moved this from 📋 Backlog to 🔖 On Deck in Banchan Project Roadmap Feb 18, 2024
@zkat zkat mentioned this issue Feb 19, 2024
28 tasks
@zkat zkat linked a pull request Mar 30, 2024 that will close this issue
28 tasks
@zkat zkat closed this as completed in 932aa06 Mar 31, 2024
@zkat zkat closed this as completed in #788 Mar 31, 2024
@github-project-automation github-project-automation bot moved this from 🔖 On Deck to ✅ Done in Banchan Project Roadmap Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical improvement General technical improvements that might not be user-visible or affect the overall site experience.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant