added ability to turn off persistence. Waiting on Chris for final changes

This updates the state mixin to be aware of the use_persistence variable

Per Chris's request, this variable is invisible to the user for all blocks where it is disabled. **However** I have left it visible for the StateChange block itself, as it is not disabled by default there. **Please Comment**
I think the functionality is great the way you have it now. But I agree
with Matt on the renaming of the property.

This can be used to 'reset' because if you turn off load_from_persistence
then it will start fresh but still save the results. Then you can turn it
on and restart your service and it will pick up where it left off.

*CHRIS BRACKERT*

neutral.io

*M:* +1 310 357 7194
*cbrackert@neutral.io <cbrackert@neutral.io>* / *www.neutral.io*
<http://www.neutral.io/>

*Join the Conversation: **Google+
<https://plus.google.com/u/0/106721327721543812106/posts>,* *Twitter
<http://www.twitter.com/neutral_io>, Facebook
<https://www.facebook.com/neutralio>*

On Fri, Oct 10, 2014 at 12:36 PM, Garrett Berg <notifications@github.com>
wrote:

> In state_mixin.py:
>
> > @@ -23,7 +27,8 @@ def __init__(self):
> >
> >      def configure(self, context):
> >          super().configure(context)
> > -        self._state = self.persistence.load('state') or self._state
> > +        if self.use_persistence:
>
> I actually did that by accident! I forgot to add it to the stop, haha
>
> Why does it allow you to reset the persistence? Wouldn't it currently just
> save the persistence of the block that isn't using persistence?
>
> I agree that it would be a good idea to reset (i.e. delete) the
> persistence if a block isn't using it. Do you want that to happen?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nio-blocks/state_change/pull/9/files#r18726262>.
>