On Sep 10, 2013, at 7:28 AM, Mateus Caruccio <mateus caruccio getupcloud com> wrote:
Not easily. Connection hooks run once - their output can't be sent directly to the web gears. However, you can do this:
create two carts - your db, and a web framework plugin (lets you be placed with the web framework gears). Have a subscribe in the plugin that the db publishes
We'd like to fix it so carts can expose their variables back to the web gears after a subscribe hook is fired, or come up with a way to centrally distribute an app env var from any gear.
You might be able to set an app env var during setup of the gear (someone else can chime in if I'm wrong) - that doesn't isolate you very well from race conditions or give you everything you need to know (hooks not yet run) so I don't think that's a full solution.
Its the broker auth key, it has limited rights (can only scale and read the app), but you can pass that to the rest API as a header. You can create an auth token for your domain or app and set that as an app env var - that token can have full scoping rights.