On Tue, Aug 19, 2014 at 4:00 PM, Aaron Bentley <aaron.bent...@canonical.com>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 14-08-19 09:42 AM, Gustavo Niemeyer wrote:
> > I have never seen myself a single charm that completely ignores
> > all the action cues to simply re-read the whole state from the
> > ground up,
>
> The cs:~juju-qa/precise/juju-reports charm follows this general
> pattern, but there are some specialized hooks: install, start, stop
> and upgrade-charm.
>

...and in case it's not clear: defined hooks would still continue to run at
the appropriate times, so exceptions can be accommodated. But I think it
becomes valuable as soon as there's any subset of hooks (most likely,
indeed, the relation ones) where the charm's put in a position of
rescanning the world one change at a time -- in which case all such
situations can be handled in batches at a more measured cadence.

config-changed, database-relation-broken, database-relation-changed,
> database-relation-departed, and website-relation-changed are all the
> same code and read the state afresh every time without reference to
> the script name.
>
> The charmworld charm is similar.
>

And I'd be most interested to hear from anyone else who is also finding
this mode of interaction with juju to be convenient...

Cheers
William
-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to