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.
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