Skip to content

Commit

Permalink
Don't cache json build status objects; they are never cleaned up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Zager committed May 1, 2012
1 parent b0d9882 commit ff8480d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions master/buildbot/status/web/status_json.py
Expand Up @@ -446,17 +446,7 @@ def getChild(self, path, request):
if isinstance(path, int) or _IS_INT.match(path):
build_status = self.builder_status.getBuild(int(path))
if build_status:
build_status_number = str(build_status.getNumber())
# Happens with negative numbers.
child = self.children.get(build_status_number)
if child:
return child
# Create it on-demand.
child = BuildJsonResource(self.status, build_status)
# Cache it. Never cache negative numbers.
# TODO(maruel): Cleanup the cache once it's too heavy!
self.putChild(build_status_number, child)
return child
return BuildJsonResource(self.status, build_status)
return JsonResource.getChild(self, path, request)

def asDict(self, request):
Expand Down

0 comments on commit ff8480d

Please sign in to comment.