This commit is contained in:
team3
2026-09-07 07:44:00 +02:00
parent 5d42b4cfc5
commit c6bbed4049
250 changed files with 13372 additions and 6203 deletions

View File

@@ -510,7 +510,7 @@ async def _stil_aufgaben(projekt: str):
stand = ledger.lade(projekt)
stand["stil"] = ledger.behalte(stand["stil"], {_stilschluessel(a) for a in liste})
return (liste,
lambda a, _zaehl: _pruefe(stil, a, stand),
lambda a: _pruefe(stil, a, stand),
lambda: ledger.sichere(projekt, stand))
@@ -523,17 +523,12 @@ async def _lauf(projekt: str, liste: list[dict], arbeite, abschluss=None):
lauf = _laeufe[projekt]
schranke = asyncio.Semaphore(config.PRUEFUNG_PARALLEL)
def zaehl():
lauf["fertig"] += 1
async def eine(aufgabe):
if aufgabe is None:
return # Platzhalter: zählt der Sammellauf selbst hoch
async with schranke:
if _laeufe.get(projekt) is not lauf:
return # verworfen (Panel geschlossen) — keine weitere Anfrage
try:
lauf["probleme"].extend(await arbeite(aufgabe, zaehl))
lauf["probleme"].extend(await arbeite(aufgabe))
except Exception as e:
# Zählt trotzdem als erledigt, sonst hängt der Fortschritt.
# Die Meldung nennt die Zahl, damit „100 %" nicht vollständig vortäuscht.
@@ -541,8 +536,7 @@ async def _lauf(projekt: str, liste: list[dict], arbeite, abschluss=None):
lauf["meldung"] = (
f"{lauf['fehler']} von {lauf['gesamt']} Prüfungen fehlgeschlagen: {e}"
)
if aufgabe is not True:
lauf["fertig"] += 1
lauf["fertig"] += 1
try:
await asyncio.gather(*(eine(a) for a in liste))