spacepaste

  1.  
  2. 2013-07-19 12:47:29-0700 [-] Shutting down, but these builders have someone waiting for them: [<Builder ''builder2-test-slave'' at 36320176>]
  3. --- master.py 2013-07-19 12:53:29.542900626 -0700
  4. +++ master_fixed.py 2013-07-19 12:53:22.811653814 -0700
  5. @@ -161,9 +161,19 @@
  6. return sorted(builders, self._sortfunc)
  7. def _get_processors(self):
  8. - if self.shuttingDown:
  9. - return []
  10. - builders = self.builders.values()
  11. + if not self.shuttingDown:
  12. + builders = self.builders.values()
  13. + else:
  14. + # Allow builders to run if they have something waiting on them.
  15. + # SMELL: this is pretty tightly coupled to the Triggerable scheduler implementation.
  16. + builders = list(set(
  17. + self.builders[bname]
  18. + for waiting in self.parent.allSchedulers()
  19. + for bname in waiting.builderNames
  20. + if getattr(waiting, '_waiters', None)
  21. + ))
  22. + if builders:
  23. + log.msg("Shutting down, but these builders have someone waiting for them: %r" % builders)
  24. sorter = self.prioritizeBuilders or self._sort_builders
  25. try:
  26. builders = sorter(self.parent, builders)
  27.