Created
July 24, 2013 03:05
-
-
Save psftw/6067799 to your computer and use it in GitHub Desktop.
check for build jobs without sane retention policies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from glob import glob | |
# check for build jobs without sane retention policies | |
data = [] | |
for bdir in glob("jobs/*/builds"): | |
walkgen = os.walk(bdir) | |
dirpath, dirnames, filenames = walkgen.next() | |
data.append((len(dirnames), bdir)) | |
data.sort() | |
for (cnt, bdir) in data: | |
if cnt > 20: | |
print "%4s %s" % (cnt, bdir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment