foodcoop-adam / foodsoft

DEPRECATED, being merged in upstream. Web-based software for foodcoops - as used in NL.
http://foodcoop-adam.github.io/
Other
10 stars 3 forks source link

multishared cascading config #127

Closed wvengen closed 9 years ago

wvengen commented 10 years ago

Now that a configuration screen is present in wvengen/feature-config_db, the multishared plugin needs to be able to work with it; meaning that sub-foodcoops (like with fc-eindhoven) need to take the configuration of the master foodcoop (central).

wvengen commented 10 years ago

I've tried to add an inherit configuration key for inheriting config from a different foodcoop. This involves running select_foodcoop, reading the keys, then going back to select_foodcoop for the current foodcoop. This is a bit of overhead for each fetching of a configuration key.

Solution: in the multishared plugin, hook getting a configuration value to

  1. Find it in current foodcoop's database
  2. Find it in current foodcoop's config
  3. Find it in joined foodcoop's database
  4. Find it in joined foodcoop's config

This requires removing something like <<: *parent_coop in the config for foodcoops using join_scope. It should be possible to do these things without needing to call select_foodcoop, just querying the database and config hash.

wvengen commented 9 years ago

We won't be continuing in this direction.