[Buildbot-devel] graceful shutdown of ChangeSource sevices

Jorge Gonzalez gjorge at google.com
Fri Jun 7 02:13:50 UTC 2013


Thanks Dustin!
In master the method seems to be invoked and waited for correctly. One
funny thing I observed though is that my toy poller below would actually
not get invoked! Only its stopService() was called...

class FakePoller(PollingChangeSource):

  pollInterval = 10

  def poll(self):
    log.msg("FakePoller: entered poll. Sleeping for 10 secs")
    time.sleep(10)
    log.msg("FakePoller: done with poll")

  def stopService(self):
    log.msg("FakePoller: entered stopService. Sleeping for 20 secs")
    time.sleep(20)
    log.msg("FakePoller: done with stopService")
    return PollingChangeSource.stopService(self)

At any rate, would you be able to provide my with any hints to find out the
right set of commits that fixed this? I'd like to patch them to our
internal 0.8.6-based branch.

Thanks!
Jorge.

Jorge


On Thu, Jun 6, 2013 at 6:40 PM, Dustin J. Mitchell <dustin at v.igoro.us>wrote:

> On Thu, Jun 6, 2013 at 1:12 AM, Jorge Gonzalez <gjorge at google.com> wrote:
> > buildbot.changes.base.PollingChangeSource has a stopService() method that
> > I'd expect it gets called when `buildbot stop` is invoked from the
> command
> > line, but as far as I can tell, it's never being executed.
> >
> > The reason I'm asking this is because I have a subclass of
> > PollingChangeSource which I'd like to shutdown gracefully when the master
> > shuts down, and overriding PollingChangeSource.stopService() seems to be
> of
> > no use. Is there a another way of doing this?
>
> I believe this was a bug that Jared has fixed in master.  Can you
> check whether it's still not called in master (or, better, the 0.8.8
> branch)?
>
> Dustin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130606/c22934a8/attachment.html>


More information about the devel mailing list