modified: .gitignore

modified:   ai-worker/worker.py
	modified:   server-app/main.go
This commit is contained in:
hubble_dubble
2026-01-26 01:04:58 +01:00
parent 3667c678e4
commit 4e235c2f28
3 changed files with 4 additions and 11 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
volumes/ai-models/ volumes/ai-models/
volumes/images/ volumes/images/
volumes/postgres/ volumes/postgres/
NewsSite.code-workspace

View File

@@ -161,13 +161,6 @@ def main():
result = generate_image(prompt) result = generate_image(prompt)
if result: if result:
data_uri, img_bytes = 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) update_image(cur, aid, data_uri)
logging.info("Bild gesetzt für Artikel %s", aid) logging.info("Bild gesetzt für Artikel %s", aid)
else: else:

View File

@@ -210,7 +210,7 @@ func main() {
FROM articles FROM articles
WHERE image IS NOT NULL WHERE image IS NOT NULL
ORDER BY COALESCE(published_at, created_at) DESC ORDER BY COALESCE(published_at, created_at) DESC
LIMIT 100 LIMIT 20
`) `)
if err != nil { if err != nil {
return err return err
@@ -227,7 +227,6 @@ func main() {
// Kickstart: sofort 1 Byte senden, damit Streaming „anfängt“ // Kickstart: sofort 1 Byte senden, damit Streaming „anfängt“
enc := json.NewEncoder(w) enc := json.NewEncoder(w)
flusher, ok := w.(http.Flusher) flusher, ok := w.(http.Flusher)