How to run something in the background after action?
HarryET:
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
ZachDaniel:
There is nothing currently in Ash that helps you do that, although there likely will be plugins/extensions some day to help.
ZachDaniel:
The general pattern is to use elixir primitives (like genservers/supervised tasks) or to use a tool like
Oban
to do that work.
ZachDaniel:
Then in your notifier you would do something like
GenServer.cast(server, ....)
or
Oban.insert!(....)
HarryET:
ah ok
HarryET:
thanks!