You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using get_env() to read a config file (i.e. [app_env]).
If I change the configuration file, is there an API I can use to tell gproc to reload this (or all) properties? It's not exactly clear that there is a way, and I'm digging into the code right now to figure it out.
thanks
The text was updated successfully, but these errors were encountered:
Well, if you use gproc:get_env() consistently, gproc will always go back to the source. If you use gproc:get_set_env(), gproc will cache the result (even undefined if the value isn't found).
Once you have cached the value, gproc will read the cache every time. There is no API function for clearing the cache, but you could do:
The pattern gproc:info(Pid, {gproc, Pattern}) is not documented. This is an oversight. It should be the most scalable[1] way to fetch your own cached values (remember, you can't clear the cache of any other process).
[1] I.e. it uses the reverse mapping for the Pid. The QLC table generator could theoretically do that too, if the pid pattern is bound, but it currently doesn't. Anyone who feels strongly about this is welcome to try for a PR. Using gproc:select() with wildcards in the gproc_env tuple pattern, the operation will scan the cached values of all processes.
I am using get_env() to read a config file (i.e. [app_env]).
If I change the configuration file, is there an API I can use to tell gproc to reload this (or all) properties? It's not exactly clear that there is a way, and I'm digging into the code right now to figure it out.
thanks
The text was updated successfully, but these errors were encountered: