← Back to team overview

launchpad-dev team mailing list archive

Re: generic job queue cronjob?

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/24/2010 05:45 PM, Martin Pool wrote:
> On 24 September 2010 23:27, Aaron Bentley <aaron@xxxxxxxxxxxxx> wrote:
> Right.  I was wondering if Launchpad was going to (now, or later)
> change to just sending "this branch tip changed" and then have the
> recipients decide what to do with that.  For instance, we want to
> update precalculated mp preview diffs when the branch changes.
> Ideally, in a message system, the branch scanner wouldn't need to know
> anything about that, only the job that's subscribed to those events.

We are already pretty decoupled there.  When the scanner notices a
branch tip change, it fires a TipChanged event.  One of the subscribers
generates the appropriate UpdatePreviewDiffJob.

> If we want to take that direction perhaps it's better not considering
> it only as a task dispatch system?

I don't know about that.  It's quite useful to represent this as a job,
not an event.  (You could do an event message which generates a job
message, but that seems inefficient to me.)

We can then inform our users that a diff is pending (and maybe
distinguish between "pending" and "in progress").  This is a real-world
example of imperative messages imply an expected consequence, while
informative messages don't, and leave us less-informed as a consequence.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAkygoDMACgkQ0F+nu1YWqI2NdgCfUi7M5/dYIdyIZ98TBJuf0VE9
FNIAljoZUtpdnethkQzOlWoj43DW4iE=
=mAYY
-----END PGP SIGNATURE-----



Follow ups

References