elixir-toniq / vapor

Runtime configuration system for Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

config init callback

keathley opened this issue · comments

We need to provide an init callback for the config behaviour so that users can arbitrarily decide to take actions once the configuration has been retrieved.

Is it possible to config an init callback? I see this section in the README which I think says that you can, but when I try it doesn't call the function. I've tried 0.2.0 and master (switching to the Plan module accordingly for master)

The reason I'm trying to do this is because twittex uses Application.fetch_env! in a couple of places, so I'm trying to set application variables before twittex is loaded (the way to do that seems to be to set runtime: false for the dep in mix.exs and then to put it into extra_applications). I'd be happy to have a better way if you know of one ;)

This is going to be solved in #51