Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix canillita:start/2 #39

Open
elbrujohalcon opened this issue Apr 3, 2017 · 0 comments
Open

Fix canillita:start/2 #39

elbrujohalcon opened this issue Apr 3, 2017 · 0 comments
Labels

Comments

@elbrujohalcon
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant