App won't launch with mix app.start but with iex -S mix

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 ?

Thanks !

Answer to myself and maybe it could be useful to other beginners as me :slight_smile:

Simply launch the app with :

 mix run --no-halt
3 Likes

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 :slight_smile:

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.