From 4e235c2f281074188939e0927754b90804eaf4c8 Mon Sep 17 00:00:00 2001 From: hubble_dubble Date: Mon, 26 Jan 2026 01:04:58 +0100 Subject: [PATCH] modified: .gitignore modified: ai-worker/worker.py modified: server-app/main.go --- .gitignore | 3 ++- ai-worker/worker.py | 7 ------- server-app/main.go | 5 ++--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index ba3a005..3ed4708 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ volumes/ai-models/ volumes/images/ -volumes/postgres/ \ No newline at end of file +volumes/postgres/ +NewsSite.code-workspace \ No newline at end of file diff --git a/ai-worker/worker.py b/ai-worker/worker.py index d9aeb18..a1c108b 100644 --- a/ai-worker/worker.py +++ b/ai-worker/worker.py @@ -161,13 +161,6 @@ def main(): result = generate_image(prompt) if result: data_uri, img_bytes = result - filename = f"{safe_filename(article_id)}.png" - out_path = IMAGE_OUTPUT_DIR / filename - try: - out_path.write_bytes(img_bytes) - logging.info("Bild gespeichert unter %s", out_path) - except Exception as e: - logging.error("Konnte Bild nicht speichern (%s): %s", out_path, e) update_image(cur, aid, data_uri) logging.info("Bild gesetzt für Artikel %s", aid) else: diff --git a/server-app/main.go b/server-app/main.go index e36587d..391dbfd 100644 --- a/server-app/main.go +++ b/server-app/main.go @@ -210,7 +210,7 @@ func main() { FROM articles WHERE image IS NOT NULL ORDER BY COALESCE(published_at, created_at) DESC - LIMIT 100 + LIMIT 20 `) if err != nil { return err @@ -226,7 +226,6 @@ func main() { w.WriteHeader(http.StatusOK) // Kickstart: sofort 1 Byte senden, damit Streaming „anfängt“ - enc := json.NewEncoder(w) @@ -238,7 +237,7 @@ func main() { w.Write([]byte("\n")) flusher.Flush() - + for rows.Next() { var title, link, summary string var image *string