On 28 January 2016 at 22:47, Merlijn Sebrechts
<[email protected]> wrote:
> Hi Marco
>
>
> Just to be clear, I was talking about wrapping the code to set a state that
> shows if something changed. I wasn't sure how to implement this. States are
> saved across hook invocations but 'x.changed' should be removed at the end
> of a hook invocation. Stuart's code solves this problem by updating the
> 'x.changed' state at the start of each hook invocation using
> hookenv.atstart().

Thats a bit of a hack.
https://github.com/juju-solutions/charms.reactive/pull/20 adds a
@setup decorator to charms.reactive which I think would be better.

-- 
Stuart Bishop <[email protected]>

-- 
Juju mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju

Reply via email to