-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose parameterlist of current inform to the session context #272
base: master
Are you sure you want to change the base?
Conversation
This would be perfect for sending events to an external application (via a external script that uses HTTP or Redis pub-sub etc) when an inform occurs. Do the provisions ever run at a time that is not triggered by an Inform? |
I've been thinking about this after it was discussed in the mailing list a while back. This solution, while simple and straight forward, is not caching friendly. In a future release I plan to implement caching for provisions to skip executing a provision script if we know it won't have an effect (provision scripts are guaranteed to be idempotent). Not to go into details of how that works, the fact that you're representing all inform parameter names in a single parameter will cause unnecessary cache invalidation. If each inform parameter is to be represented separately then that would solve the caching problem. |
No. @jameswmcnab |
Ok, so I want to propose the following modification:
|
@zaidka Any opinion about this? |
ed0cf44
to
408b7ba
Compare
@zaidka I rewrote the patch. Now every inform parameter is added separately, with both path and value. Please review. |
Any reason this can't be merged now the cache invalidation issue is resolved @zaidka? |
e8b7d94
to
c836c73
Compare
This commit exposes the parameterlist of the current inform to the session context to enable the user to access it in a provision script via the path Events.Inform.ParameterList.
A valid usecase would be to check the parameterlist for any parameter of interest and then trigger needed actions to respond to the value change of that parameter.