I developed a small application which simply move some data from a db to another one. The process of moving data is managed with a GenServer app (Tanuki.Migrator) added to the supervision tree.
The code is available here : https://gitlab.com/eost/tanuki
When I launch my project with iex -S mix Tanuki.Migrator is launched but when I use mix app.start, nothing happened (return code is 0), what I missed ?
Answer to myself and maybe it could be useful to other beginners as me
Simply launch the app with :
mix run --no-halt
I was just about to say this … ha! I ran into this so many times when starting out with Elixir, so you are definitely not alone in your experience … I wonder if that shouldn’t just be the default?
Where I’m ashamed I got the same issue playing with Golang and async channels, should have figure out the problem by myself
I think it’s ok that’s the default behaviour as you may want app that do their job and then quit when they are done.