Ash FrameworkAF
Ash Framework8mo ago
9 replies
Terris

Is there a way to detect running in "seed data" mode?

I added a custom GenServer that doesn't need to start when installing seed data using:

mix run priv/repo/seeds.exs

How might an Ash application know that it was invoked in a utility mode and not completely start itself?

Code:

https://github.com/dev-guy/geo/blob/28bdbb6c82a6d60927266527ae570046022b6e95/lib/geo/application.ex#L10

I added this line:

{Geo.Resources.Country.CacheSupervisor, []},
Solution
Its not an Ash specific thing though
Was this page helpful?