summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/balance_storage_groups.py
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-04-15 16:03:54 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-04-15 16:03:54 (GMT)
commitbb091376dfc682e05bae43a2abc60a07ecdda47c (patch)
treea54c0a7b7521395eecabd55ac0bc84ed75540cd3 /abs/core/LinHES-system/balance_storage_groups.py
parent6759ed6b4d8da4648bf2ffcb58c69505a94f5d40 (diff)
downloadlinhes_pkgbuild-bb091376dfc682e05bae43a2abc60a07ecdda47c.zip
linhes_pkgbuild-bb091376dfc682e05bae43a2abc60a07ecdda47c.tar.gz
linhes_pkgbuild-bb091376dfc682e05bae43a2abc60a07ecdda47c.tar.bz2
LinHES-system: balance_storage_groups.py empty_storage_groups.py: add .ts files
Diffstat (limited to 'abs/core/LinHES-system/balance_storage_groups.py')
-rwxr-xr-xabs/core/LinHES-system/balance_storage_groups.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/abs/core/LinHES-system/balance_storage_groups.py b/abs/core/LinHES-system/balance_storage_groups.py
index e088cb5..27de6a9 100755
--- a/abs/core/LinHES-system/balance_storage_groups.py
+++ b/abs/core/LinHES-system/balance_storage_groups.py
@@ -80,12 +80,12 @@ if __name__ == '__main__':
SGDIRSdata = sorted(SGDIRSdata, reverse=True, key=operator.itemgetter(1))
#print SGDIRSdata
- # Check if SG has any mpg or nuv files
+ # Check if SG has any ts, mpg or nuv files
i=0
for dir in SGDIRSdata:
mostFull = SGDIRSdata[i]
i=i+1
- if len(glob.glob1(mostFull[0],"*.mpg")) or len(glob.glob1(mostFull[0],"*.nuv")):
+ if len(glob.glob1(mostFull[0],"*.ts")) or len(glob.glob1(mostFull[0],"*.mpg")) or len(glob.glob1(mostFull[0],"*.nuv")):
break
else:
if i == 1:
@@ -106,7 +106,7 @@ if __name__ == '__main__':
sys.exit()
# Get random file from most used dir
- fileToMove = random.choice([f for f in os.listdir(mostFull[0]) if f.endswith(".mpg") or f.endswith(".nuv")])
+ fileToMove = random.choice([f for f in os.listdir(mostFull[0]) if f.endswith(".ts") or f.endswith(".mpg") or f.endswith(".nuv")])
filePathToMove = mostFull[0] + "/" + fileToMove
# Check that the file isn't too big for least used dir