singleton icon indicating copy to clipboard operation
singleton copied to clipboard

Let user run Singleton under their application's supervision tree

Open ericdude4 opened this issue 5 years ago • 11 comments
trafficstars

Is there a reason why a user would want this running as its own OTP application? Also, running it as a separate application was always breaking my application as described in README was always breaking my app, but I think elixir runs the apps listed in deps() as applications now anyways.

This merge would require an increased major version, then I guess the README should be updated as well w/ new version.

ericdude4 avatar Oct 02 '20 21:10 ericdude4

If you would go this route, it only makes sense to do this when the supervisor in your own OTP app is named. And that would also mean that all Singleton.* calls would get an extra first argument, the name of the Singleton supervisor.

arjan avatar Oct 03 '20 07:10 arjan

@arjan I agree. I think this is the way to go moving forward though. This strategy of naming the supervisor based on your own OTP app seems to be the standard nowadays. Like I mentioned, make sure we increment the major version if you decide to merge this :)

I really like this package btw, works really well when paired with the :swarm package!

ericdude4 avatar Oct 05 '20 13:10 ericdude4

Hey @arjan, have you had any time to review/think about this? I would love to stop referencing my fork in my deps in my production app :)

ericdude4 avatar Oct 08 '20 18:10 ericdude4

Yes! I think this is a good change. I will release 2.0.0 tomorrow if I get around to it.

arjan avatar Oct 08 '20 18:10 arjan

@arjan do you mind adding the hacktoberfest-accepted label to this pull request?

ericdude4 avatar Oct 09 '20 14:10 ericdude4

Sure, happy to!

arjan avatar Oct 09 '20 17:10 arjan

Hey @arjan, have you had some time to take a look?

ericdude4 avatar Oct 16 '20 17:10 ericdude4

I'm not sure if this will ever be merged, but if so then there are a few typos new docs: 'Sinlgeton' should probably be 'Singleton'

nbw avatar Aug 22 '22 07:08 nbw

@nbw I'm not sure why this never got merged, but please feel free to make any changes to this branch and please resolve the conflicts while you're at it :)

ericdude4 avatar Aug 22 '22 13:08 ericdude4

I am also not sure actually, I think it's a good change to structure the singleton like this. @nbw once conflicts are cleared i'll merge it!

arjan avatar Aug 22 '22 13:08 arjan

@arjan I fixed the typos that @nbw identified.

I also fixed the conflict, but wasn't sure what to do with : dynamic_supervisor_options().

ericdude4 avatar Aug 22 '22 14:08 ericdude4

Any status on this @arjan ?

MartinElvar avatar Aug 07 '23 07:08 MartinElvar

Also looking for a status update

feld avatar Nov 03 '23 18:11 feld

Any plan to release this change @arjan?

rauann avatar Dec 16 '23 13:12 rauann

Finally merged! Thanks all for your patience.

arjan avatar Dec 19 '23 08:12 arjan

I released 1.4.0 with this change.

arjan avatar Dec 19 '23 08:12 arjan