Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
bug 684245 - reduce max symbol age from 180 days to 90 days to clean …
Browse files Browse the repository at this point in the history
…up some old versions
  • Loading branch information
Ted Mielczarek committed Sep 8, 2011
1 parent 4530c86 commit 95b1b82
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions buildfarm/breakpad/cleanup-breakpad-symbols.py
Expand Up @@ -23,7 +23,7 @@
nightliesPerBin = 30
# maximum age permitted for a set of symbols, in days.
# used to clean up old feature branches, for example
maxNightlyAge = timedelta(180)
maxNightlyAge = timedelta(90)
# end options

# RE to get the version number without alpha/beta designation
Expand Down Expand Up @@ -106,7 +106,7 @@ def deletefile(f):
builds = {}
allfiles = {}
buildfiles = {}
print "[1/4] Reading symbol index files..."
print >>sys.stderr, "[1/4] Reading symbol index files..."
# get symbol index files, there's one per build
for f in os.listdir(symbolPath):
if not (os.path.isfile(os.path.join(symbolPath, f)) and
Expand Down Expand Up @@ -141,7 +141,7 @@ def deletefile(f):
adddefault(builds, identifier, [])
builds[identifier].append(f)

print "[2/4] Looking for symbols to delete..."
print >>sys.stderr, "[2/4] Looking for symbols to delete..."
oldestdate = datetime.now() - maxNightlyAge
for bin in builds:
builds[bin].sort(sortByBuildID)
Expand All @@ -157,13 +157,13 @@ def deletefile(f):
markDeleteSymbols(buildfiles[f], allfiles)
deletefile(os.path.join(symbolPath,f))

print "[3/4] Deleting symbols..."
print >>sys.stderr, "[3/4] Deleting symbols..."
# now delete all files marked for deletion
for a, refcnt in allfiles.iteritems():
if refcnt == 0:
deletefile(os.path.join(symbolPath,atoms[a]))

print "[4/4] Pruning empty directories..."
print >>sys.stderr, "[4/4] Pruning empty directories..."
sys.exit(0)
# now delete empty directories.
for root, dirs, files in os.walk(symbolPath, topdown=False):
Expand All @@ -174,4 +174,4 @@ def deletefile(f):
print "rm -rf ", fullpath
else:
os.rmdir(fullpath)
print "Done!"
print >>sys.stderr, "Done!"

0 comments on commit 95b1b82

Please sign in to comment.