Promote develop → main (2026-06-02 16:10 UTC) #47
@@ -1753,6 +1753,7 @@ class AgentOrchestrator:
|
||||
# Idempotent: nur Artikel ohne headline_de/content_de werden geholt.
|
||||
# Lauft nach der Analyse (Lagebild ist schon committed) und vor QC
|
||||
# (damit normalize_umlaut_articles auch die frischen DE-Texte fasst).
|
||||
_translate_step_started = False
|
||||
try:
|
||||
tr_cursor = await db.execute(
|
||||
"""SELECT id, headline, content_original, language
|
||||
@@ -1764,7 +1765,10 @@ class AgentOrchestrator:
|
||||
(incident_id,),
|
||||
)
|
||||
pending_translations = [dict(r) for r in await tr_cursor.fetchall()]
|
||||
if pending_translations:
|
||||
if pending_translations and translator_enabled:
|
||||
# Pipeline-Schritt 9: Artikel uebersetzen (nur sichtbar wenn was zu uebersetzen)
|
||||
await _pipe_start("translate")
|
||||
_translate_step_started = True
|
||||
logger.info(
|
||||
"Translator fuer Incident %d: %d Artikel ohne DE-Uebersetzung",
|
||||
incident_id, len(pending_translations),
|
||||
@@ -1795,8 +1799,11 @@ class AgentOrchestrator:
|
||||
"Translator fuer Incident %d: %d/%d Artikel uebersetzt",
|
||||
incident_id, len(translations), len(pending_translations),
|
||||
)
|
||||
await _pipe_done("translate", count_value=len(translations), count_secondary=len(pending_translations))
|
||||
except Exception as e:
|
||||
logger.error("Translator-Fehler fuer Incident %d: %s", incident_id, e, exc_info=True)
|
||||
if _translate_step_started:
|
||||
await _pipe_done("translate", count_value=0, count_secondary=0)
|
||||
# Refresh trotz Translator-Fehler weiterlaufen lassen
|
||||
|
||||
# --- Neueste Entwicklungen (nur Live-Monitoring / adhoc) ---
|
||||
|
||||
@@ -252,8 +252,8 @@ async def cleanup_expired():
|
||||
# vorzeitig gekillt werden. Ein Refresh gilt als verwaist, wenn entweder
|
||||
# (a) seit ORPHAN_IDLE_LIMIT Min kein Pipeline-Step Fortschritt zeigte,
|
||||
# oder (b) das harte Limit ORPHAN_HARD_LIMIT Min ueberschritten wurde.
|
||||
ORPHAN_IDLE_LIMIT = 30
|
||||
ORPHAN_HARD_LIMIT = 90
|
||||
ORPHAN_IDLE_LIMIT = 60
|
||||
ORPHAN_HARD_LIMIT = 120
|
||||
cursor = await db.execute(
|
||||
"SELECT id, incident_id, started_at FROM refresh_log WHERE status = 'running'"
|
||||
)
|
||||
|
||||
@@ -36,6 +36,8 @@ _PIPELINE_STEPS_DE = [
|
||||
"tooltip": "Aus Foren-Quellen (z.B. 5ch, Hatena, Note) wird ein Stimmungsbild der öffentlichen Diskussion extrahiert. Keine Faktenlage, sondern dominante Themen und Bruchlinien."},
|
||||
{"key": "summary", "label": "Lagebild verfassen", "icon": "file-text",
|
||||
"tooltip": "Aus allen geprüften Meldungen wird ein zusammenhängendes Lagebild geschrieben, mit Quellenangaben am Text."},
|
||||
{"key": "translate", "label": "Artikel uebersetzen", "icon": "languages",
|
||||
"tooltip": "Fremdsprachige Meldungen (z.B. japanisch) werden ins Lagebild-Output uebersetzt. Laeuft nur fuer Quellen-Pools mit nicht-deutschen Sprachen und kann bei vielen neuen Artikeln einige Minuten dauern."},
|
||||
{"key": "qc", "label": "Qualitätscheck", "icon": "check-circle",
|
||||
"tooltip": "Eine letzte Kontrollprüfung am Ergebnis: Doppelte Fakten zusammenführen, Karten-Verortung prüfen, bevor du benachrichtigt wirst."},
|
||||
{"key": "notify", "label": "Benachrichtigen", "icon": "bell",
|
||||
@@ -59,6 +61,8 @@ _PIPELINE_STEPS_EN = [
|
||||
"tooltip": "Forum sources (5ch, Hatena, Note, etc.) are summarised into a public-mood overview. Not factual, but dominant themes and fault lines."},
|
||||
{"key": "summary", "label": "Writing the briefing", "icon": "file-text",
|
||||
"tooltip": "All verified articles are combined into a coherent briefing with inline citations."},
|
||||
{"key": "translate", "label": "Translating articles", "icon": "languages",
|
||||
"tooltip": "Foreign-language articles (e.g. Japanese) are translated into the briefing output language. Runs only when the source pool contains non-target-language items and can take several minutes for large incoming batches."},
|
||||
{"key": "qc", "label": "Quality check", "icon": "check-circle",
|
||||
"tooltip": "A final review: consolidate duplicate facts, verify map locations, before you get notified."},
|
||||
{"key": "notify", "label": "Notifying", "icon": "bell",
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren