I’m working on an application with 4 umbrella apps inside of it. One of the apps is a Phoenix App that is used as API to serve the data, the others are some big dependencies that turned into apps.
So, the problem is with two of these dependencies (umbrella apps). One of them, let’s call it: A, uses a GenStage consumer that sends/fetch some data to another dependency, in our example, we will call it B.
For some reason that I can’t find out, the module B.Repo isn’t started when the A consumer makes a call to B (to save/fetch the data).
** (RuntimeError) could not lookup Ecto repo B.Repo because it was not started or it does not exist
If I make a Process.sleep call to make the consumer wait, it works properly.
Is there any way that I can choose the order that the umbrella apps starts? So that B starts before A and so it’s already available when requested?