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

Update Supervision instructions and specifications #5

Open
maikelthedev opened this issue Nov 26, 2024 · 3 comments
Open

Update Supervision instructions and specifications #5

maikelthedev opened this issue Nov 26, 2024 · 3 comments
Assignees

Comments

@maikelthedev
Copy link

Hi, I'm trying to implement Eternal but I get deprecation errors because of this line

supervisor(Eternal, [:cart_item_lookup, [ :compressed ], [ quiet: true ]]),

asi in here

image

this is the error

Supervisor.Spec.supervisor/2 is deprecated. Use the new child specifications outlined in the Supervisor module insteadElixir

if I remove supervisor and start it as pointed in the docs of supervisor like this

{Eternal, [:cart_item_lookup, [ :compressed ], [ quiet: true ]]},

it has another error that it is not a child process or something like that.

This has been changed for a long time apparently since Elixir 1.5 and we're on 1.7, can this somehow be re-descirbed on the README or docs as to how to implement it without errors?

@maikelthedev
Copy link
Author

maikelthedev commented Nov 26, 2024

Using this instead seems to work

      %{
        id: Eternal,
        start: {Eternal, :start_link, [:cart_item_lookup, [:compressed], [quiet: true]]}
      },

If the README.md and documentation could be updated, that would be great.

@maikelthedev maikelthedev changed the title Instructions unclear Instructions outdated Nov 26, 2024
@whitfin
Copy link
Owner

whitfin commented Nov 26, 2024

Hi @maikelthedev!

You're right; this library has been largely unchanged going back to v1.5 (it's small+feature complete), so the instructions were outdated. I've updated this in the README, but I'm going to leave this issue open because there are some other improvements I can make in the library itself for the new Supervision setup.

Thank you for filing this issue 🎉

@whitfin whitfin changed the title Instructions outdated Update Supervision instructions and specifications Nov 26, 2024
@whitfin whitfin self-assigned this Nov 26, 2024
@maikelthedev
Copy link
Author

thank you @whitfin

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

No branches or pull requests

2 participants