I’ve created an Elixir application which starts a
*.Application module as a mod in
mix.exs and I’ve created a mix task which starts said app. Everything is fun here but I’ve realized that I have a bit of an issue and I can’t seem to find a solution.
When I start my application with
iex -S mix while my task is active the application process starts again so I have a double app running. This is an issue for me as I’ve coded a discord bot in Elixir so I have double responds to every event currently consumed.
As it is an OSS project, rather than giving you small snippets of code, here’s the link for it.
How do I do this as how Phoenix did it that when I start
iex -S mix the web process isn’t duplicated as well?