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

Added stream activate and deactivate methods #933

Merged
merged 2 commits into from Oct 14, 2016

Conversation

Projects
None yet
2 participants
@philippjfr
Member

philippjfr commented Oct 14, 2016

Adds Stream.activate and Stream.deactivate methods to streams to be triggered just before updating parameters and just after triggering the stream respectively. This allows defining custom actions after an event, e.g. in order to reset the value after an event has been processed.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Oct 14, 2016

I think it is a bit odd that activate is called only if you use update. This means:

  • If you use update with trigger=False, then activate is called but deactivate isn't.
  • If you use the trigger classmethod directly then deactivate is called by activate isn't.

Can both activate and deactivate be used in the trigger classmethod?

@jlstevens

This comment has been minimized.

Member

jlstevens commented Oct 14, 2016

Looks good. Merging.

@jlstevens jlstevens merged commit 69d0df5 into master Oct 14, 2016

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls First build on streams_deactivate at 73.005%
Details
s3-reference-data-cache Test data is cached.
Details

@philippjfr philippjfr deleted the streams_deactivate branch Jan 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment