May 19, 2006
1:33 p.m.
Hi, I have to call a web service then process the answer, according to the answer I may have to call the service again. The traditional way to go would be : condition = 1 while condition: message = callWebService() condition = processMessage(message) Here is what I do : def function(): def myCalback(message): condition = processMessage(message) if condition: deferred = callWebService() deferred.addCallback(myCallback) deferred = callWebService() deferred.addCallback(myCallback) I was wondering if it was the way to go or if there was a better way, since I'm not quite sure about the impact of calling new deffered within a callback. Thanks, Stéphane