monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Triggers (was: Re: FAQ on wiki)


From: Daniel Carosone
Subject: Re: [Monotone-devel] Triggers (was: Re: FAQ on wiki)
Date: Thu, 13 Jul 2006 19:16:38 +1000
User-agent: Mutt/1.5.11

On Thu, Jul 13, 2006 at 10:07:35AM +0200, Koen Kooi wrote:
> >> Do you want it done by crontab or through note_netsync_end()?
> > 
> > Crontab, I'd think, or even a 'while sleep 600; ...' script run under
> > daemontools supervision :-).  (This is how the CIA script works now,
> > to avoid crontab obnoxiousness.)  Rather not couple the server and
> > website that closely...
> 
> Does monotone provide functionality for triggers? I'd like to have
> cia notified immediately when a rev hits the 'main' server and do
> 'make xhtml && cp xhtml/* /path/to/website/docs/' when a rev hits
> the org.openembedded.documentation branch.

The note_* hooks Richard was talking about are exactly these kinds of
triggers.

An important point about these triggers is that you don't want to do
much work directly inside of them, and that of course they run in
the user context of the server.

The latter part relates to njs' preference for some separation between
the two, the former relates to the (more recent) addition of the
note_netsync_end() hook to the collection that previously noted
individual new revisions. 

The best system would be one that touched a flag file or similar (ie,
published the notification) on receipt of a relevant new revision or
session, and then sent a signal or otherwise woke up an updater thread
at the end of the session or from cron.  The updater would pull the
new revs into its own db, update its workspace according to
appropriate trust criteria, build, run tests (perhaps applying
testresult certs based on the results?) and then finally install to
the webroot.

> and if yes, could someone add an example to the docs/faq/etc?

There are docs for these hooks, but they could (as ever) use some
improvement and - especially - some concrete examples.  Scripts like
these ones would make great examples that I'm sure other people would
use more or less directly too.

--
Dan.

Attachment: pgpNPDhZZbdjm.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]