Waffle maintainer here.
Deleting by triggers approach is completely new to me. Generally it’s recommended to keep all logic inside the application in order to have all in one place.
If you want to have async deletion operation, you could utilise queue libraries for this.
As you described, you’re performing record deletion by handling prostgres events with triggers. All you need to do is to call elixir callback after record deletion with record attributes which will call file deletion function.
In other words, file deletion will work as any other callback action. I guess your question is not about file deletion but about how to invoke a callback in elixir after prostgres trigger. Am I right?






















