Closed KristerV closed 10 months ago
Thank you @KristerV for the suggestion.
A new function auto_detect_resources/0
has been added to Utils
which currently only calls setup_resources()
.
def auto_detect_resources(), do: setup_resources()
This will be available in the next release 👍🏻
Describe the problem you're proposing to solve
The auto-detected resources get me 99% there, but I really need to change two things about it (and auto-update new resources added in the future). There is no obvious way to get the resources automatically and modify them.
Describe the solution you'd like
I want to fetch the auto-detected resources and modify it in
MyApp.KaffyConf.create_resources
.Describe alternatives you've considered
I read the code and it seems
def full_resources(conn)
is what i need, but it goes into an infinite loop, because it ends up callingcreate_resources()
again. So really it seems thatdefp setup_resources
does what i need without the infinite loop, but that's private.Additional context
I've already created a fork and made the function public to test it out and it works great. Diff here.
My question is should I open the PR or is there something I'm missing? If I do open a PR then I think the name
setup_resources
should probably be changed toauto_detect_resources
or something.