[Buildbot-devel] deferreds from polling change source

Jorge Gonzalez gjorge at google.com
Thu Jun 27 07:20:14 UTC 2013


I want to return a deferred from a PollingChangeSource.poll()'s method.
This is what I'm doing:

  def poll(self):
    defered_poll = defer.Deferred()
    defered_poll.addCallback(lambda _: self.DoTheActualPoll())
    defered_poll.callback(None)
    return defered_poll

This seems to work, but it blocks the master web GUI while
DoTheActualPoll() is running.
Is this the right way to go about returning a Deferred that will call
DoTheActualPoll() in the background?

Thanks,
Jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130627/b4db9027/attachment.html>


More information about the devel mailing list