How to run something in the background after action?
Hi, I tried using notifiers but it looks like they block. Is there a way to run something in the background that is triggered by an actions e.g. user_created, etc
2 Replies
There is nothing currently in Ash that helps you do that, although there likely will be plugins/extensions some day to help.
The general pattern is to use elixir primitives (like genservers/supervised tasks) or to use a tool like
Oban
to do that work.
Then in your notifier you would do something like GenServer.cast(server, ....)
or Oban.insert!(....)
ah ok
thanks!