fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Possible issue stacking decorators


From: Jeff Forcier
Subject: Re: [Fab-user] Possible issue stacking decorators
Date: Fri, 15 Jul 2011 16:07:00 -0700

Hey Erich,

On Fri, Jul 15, 2011 at 8:47 AM, Erich Heine <address@hidden> wrote:
> I would propose a "task protocol" like so:
> 1. @task wraps a function in a task object (if it is not already such an
> object)
> 2. Any decorator that assumes a task wraps the function in a task object, if
> it is not already such an object.
> 3. Any decorator that doesn't assume a task (but is officially part of
> fabric) must have semantics that can work with a task object or explicitly
> fails because it doesn't handle task objects.

I don't have time right now to go over the meat of your proposal, but
I do want to highlight that Travis and I were previously discussing
"normalizing" the system so that even classic-style tasks become
wrapped in Task objects.

So the above protocol of sorts would fit right into this idea, and I
agree that it would be a good way to limit/fix the decorator-ordering
problem.

Not sure we could slot it in immediately, though; I want to avoid
running off on a(n even) long(er) "beef up the new Task stuff" tangent
-- there's other changes (parallel, logging etc) which take priority.
But it definitely feels like a good thing to tackle in the medium-term
future.

Best,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

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