-
Notifications
You must be signed in to change notification settings - Fork 11
Description
One of the coolest things in SumoREST is that when you build an app using it you don't need any supervision tree. All the processes are taken care of by sumo_db, cowboy, ranch, etc…
You have your own app (that you need, at least, to get yourself a release, right?) and what you do in your application modules is this nasty nasty thing:
-spec start(application:start_type(), noargs) -> {ok, pid()}.
start(_Type, noargs) -> {ok, self()}.Because we're not using supervision tree, but we're using the app for relx and start phases.
Tools like erlang performance lab assume that your app is OTP-compliant (as expected) and returning {ok, self()} is not, as noted in erlanglab/erlangpl#29.
We need to find an alternative way of achieving our goals.
@legoscia pointed out that we could just run what we are currently running on canillita:start_phase/2 in canillita.script directly and just get rid of the mod property in canillita.app.src.
Since canillita.script is generated by relx, we would need to let relx know that we do want to do that using appropriate configuration.