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

What is being supervised? #50

Closed
DavidAntaramian opened this issue May 26, 2016 · 2 comments
Closed

What is being supervised? #50

DavidAntaramian opened this issue May 26, 2016 · 2 comments

Comments

@DavidAntaramian
Copy link
Contributor

DavidAntaramian commented May 26, 2016

I'm trying to advise someone on how to use this library, but I don't understand why you're starting a supervision tree. When I actually open the supervisor module's definition, nothing is being supervised. And from what I can tell, no children are ever dynamically added to the supervision tree.

You're also informing consumers that they need to insert Stripe into their own supervision tree, but that's incorrect as you have already started a supervision tree for the application which exists external the to the consumer's application at run-time.

As far as I can tell, a consumer should only have to add :stripity_stripe to their applications list, solely to have the application controller load :httpoison as an application. This also means there's no need to call HTTPoison.start/1 inside your code since this will be handled by ERTS/BEAM.

I'd appreciate pointers on why it's necessary to start a supervisor and what actually is being supervised. Thanks!

@robconery
Copy link
Contributor

I've been meaning to clean this mess up for a while - thanks for the prod :). When I forked this project I left everything basically the way it was because it worked. But there are numerous places that I want to improve (using maps instead of dicts, etc) - I just haven't had the chance.

You're exactly right - the Stripe.Supervisor does nothing. I'll weed some of this out and see if I can streamline what's going on over the weekend.

@DavidAntaramian
Copy link
Contributor Author

Thanks! Will pass along the info.

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

No branches or pull requests

2 participants