nacht7 baut auch nach 07:00, solange der Laeufer aus ist (Hauptsession 03.12. 09:08); farm_ordnergroesse.py misst nur

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 09:08:49 +01:00
co-authored by Claude Opus 5.5
parent a74bb6ecba
commit 4b9aeeff1e
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ WarteFrei
$r = & powershell -NoProfile -ExecutionPolicy Bypass -File D:\Projects\pokerfreak\scratch\farm-ruhe.ps1 -Befehl 'powershell -NoProfile -ExecutionPolicy Bypass -File D:\Projects\pokerfreak\scratch\farm-tests-bb.ps1' -Aus "$o\tests.out"
Get-Content "$o\tests.out" | % { Log "(a) $_" }
WarteFrei
if ((Get-Date).Hour -ge 7) { Rot 'nach 07:00 kein Bau mehr' }
# 03.12. 09:08 Hauptsession: Bauen auch nach 07:00, solange der Laeufer aus ist (WarteFrei davor, Waechter haelt bei Laeuferstart an)
Set-Location D:\Projects\pf-basis-fd2437df; git checkout -q --detach refs/farm/bbpool; $h = (git rev-parse --short=8 HEAD).Trim(); Set-Location entscheiden\motor
$out = cargo build --release -j 16 2>&1 | Out-String
if ($out -notmatch 'Finished') { Rot 'Bau gescheitert' }
@@ -0,0 +1,23 @@
# Nur messen: Groesse je Ordner (Tiefe 1 und 2) unter D:\Projects\pokerfreak* und D:\Projects\pokerfreak-daten. Loescht nichts.
import os, sys, glob
def groesse(p):
s = 0
for w, ds, fs in os.walk(p, onerror=lambda e: None):
for f in fs:
try: s += os.lstat(os.path.join(w, f)).st_size
except OSError: pass
return s
wurzeln = sorted(set(glob.glob(r"D:\Projects\pokerfreak*")))
tief1, tief2 = [], []
for r in wurzeln:
if not os.path.isdir(r): continue
for e in os.scandir(r):
if e.is_dir(follow_symlinks=False):
g = groesse(e.path); tief1.append((g, e.path))
if g > 2**30:
for u in os.scandir(e.path):
if u.is_dir(follow_symlinks=False): tief2.append((groesse(u.path), u.path))
print("Wurzel %-45s %8.1f GB" % (r, sum(g for g, p in tief1 if p.startswith(r + os.sep)) / 2**30), flush=True)
for name, l in (("Tiefe 1", tief1), ("Tiefe 2 (in Ordnern > 1 GB)", tief2)):
print("== %s, groesste 12" % name)
for g, p in sorted(l, reverse=True)[:12]: print("%8.1f GB %s" % (g / 2**30, p))