[Twisted-Python] Re: DeferredList + LoopingCall
J Davis
mrsalty0 at gmail.com
Thu Jun 5 10:31:42 EDT 2008
As expected, the answer was pretty simple....
def returnDeferredList():
dl = defer.DeferredList([defer.Deferred(), defer.Deferred(),
defer.Deferred()])
dl.addCallback(handleResult)
dl.addErrback(handleError)
return dl
loop = task.LoopingCall(returnDeferredList)
On Sat, May 31, 2008 at 4:34 PM, J Davis <mrsalty0 at gmail.com> wrote:
> Hello,
>
> I want to group several calls to a function() that returns a deferred into
> a DeferredList so that I can add
> callbacks that will fire once each call to function() has returned.
> Furthermore, I want to arrange it so that this process repeats every X
> seconds.
> The problem I'm having is understanding how I can combine the concept of a
> DeferredList with task.LoopingCall in this scenario. Or is that even the
> right approach to take?
>
> Thanks,
> -Jake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080605/a9006e1c/attachment.htm
More information about the Twisted-Python
mailing list