← Back to team overview

launchpad-dev team mailing list archive

Re: generic job queue cronjob?

 

On Tue, Oct 5, 2010 at 5:56 AM, Robert Collins
<robert.collins@xxxxxxxxxxxxx> wrote:
> To highlight where we are at:
>
> A)  - 'tasks' - async processing which needs new processes,
> transactional handling in the event of system interrupts, are best
> done using the existing TaskSystem, and please do get involved in or
> work on the refining of the NewTaskSystem that Aaron has been leading.
>
> B) - 'events' and failure-tolerant 'do this later' stuff - We *have
> Rabbit* for this, though test suite glue is missing. If you want to
> add test suite glue, you need to change 'make run' to start a rabbit,
> and add a Layer with Rabbit in it, then go ahead and do whatever it is
> you need to do.
>
> C) - 'maintenance' tasks - please use the 'garbo' framework for this.
>
> Many cron jobs will fall into either A, B or C and can be eliminated
> immediately. Cron jobs that don't fall into A B or C may need further
> analysis. Cron jobs which fall into A but cannot be done in the
> current task system probably need some discussion :)


I actually see a combination of all three for 'tasks'. If a task needs
to be scheduled, you create the task. You also send an event via
rabbitmq so the handler for that task does not have to poll. You also
have a small job in garbo that sends events via rabbitmq for 'lost'
tasks.

(of course, if we have a good enough guarantee of delivery we don't
need to worry about 'lost' tasks.)


-- 
Stuart Bishop <stuart@xxxxxxxxxxxxxxxx>
http://www.stuartbishop.net/



Follow ups

References