Leadership layer released

Stuart Bishop stuart.bishop at canonical.com
Thu Jan 28 17:12:30 UTC 2016


On 28 January 2016 at 22:47, Merlijn Sebrechts
<merlijn.sebrechts at gmail.com> 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 <stuart.bishop at canonical.com>



More information about the Juju mailing list