Defer problem

W

wladimir

Hi,

I have an problem. I want to fire one callback after n callbacks fired, but
when i fire one callback all the chain will be executed. Example:

def handle(x):
print 'callback ' + str(x)


def handle2(x):
print 'after callbacks'


d1 = defer.Deffered()
d2 = defer.Deffered()
d3 = defer.Deffered()

d = defer.DeferredList([d1, d2, d3], fireOnOneCallback =1 ,
fireOnOneErrback=1)

d1.addCallback(handle)
d2.addCallback(handle)
d3.addCallback(handle)
#d.addCallback(handle2)

d1.callback(1)
d2.callback(2)
d3.callback(3)

I want fire handle2 after all handle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top