[Buildbot-commits] [Buildbot] #2272: Eviction of BuildStatus objects

Buildbot nobody at buildbot.net
Tue Apr 3 19:56:59 UTC 2012


#2272: Eviction of BuildStatus objects
----------------------+------------------------
Reporter:  szager     |       Owner:
    Type:  undecided  |      Status:  new
Priority:  major      |   Milestone:  undecided
 Version:  0.8.6p1    |  Resolution:
Keywords:             |
----------------------+------------------------

Comment (by szager):

 The code snippet came out a bit garbled I think; here it is again:


 {{{
 class BuildStepStatus(styles.Versioned):
   def __init__(self, parent, master, step_number):
     self.build = weakref.ref(parent)
     self.builder = parent.getBuilder()
     self.build_number = parent.getNumber()

   def getBuildStatus(self):
     result = self.build()
     if result is None:
       result = self.builder.getBuildByNumber(self.build_number)
       self.build = weakref.ref(result)
     return result
 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2272#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list