modified: .gitignore
modified: ai-worker/worker.py modified: server-app/main.go
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
volumes/ai-models/
|
||||
volumes/images/
|
||||
volumes/postgres/
|
||||
NewsSite.code-workspace
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
@@ -227,7 +227,6 @@ func main() {
|
||||
|
||||
// Kickstart: sofort 1 Byte senden, damit Streaming „anfängt“
|
||||
|
||||
|
||||
enc := json.NewEncoder(w)
|
||||
|
||||
flusher, ok := w.(http.Flusher)
|
||||
|
||||
Reference in New Issue
Block a user