fix(rewrite): make image upload non-fatal and add rewrite tracing logs

- wordpress.py: catch image download/upload failures and skip image
  instead of aborting the entire WP draft update
- pipeline.py: add INFO logs at each step of _do_rewrite_and_draft
  to trace OpenAI call, tag generation, and WP API call
- telegram_bot.py: add INFO logs around rewrite execution + exc_info
  on error for full traceback in logs
- repositories.py: include scheduled_publish_at in get_article_by_id

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OliverGiertz 2026-03-26 07:45:55 +00:00
parent 12932bca90
commit 1963e32ab4
5 changed files with 42 additions and 9 deletions

View file

@ -18,6 +18,26 @@
3. Payload-Validation/Tag-Fehler?
4. Artikel in `pending` statt `failed` markieren, wenn unklar
## Incident: Telegram-Buttons reagieren nicht / Befehle ignoriert
**Ursache:** N8N "App Release - Telegram Bot"-Workflow hat den Webhook überschrieben.
**Prüfen:**
```bash
curl -s "https://api.telegram.org/bot8403822424:AAGp8gZoNIGZv3IIan45q7P9HfM868qzXi4/getWebhookInfo" | python3 -m json.tool
```
`url` muss auf `https://news.vanityontour.de/telegram/webhook` zeigen
`allowed_updates` muss `["message", "callback_query"]` enthalten
**Webhook zurücksetzen:**
```bash
curl -s -X POST "https://api.telegram.org/bot8403822424:AAGp8gZoNIGZv3IIan45q7P9HfM868qzXi4/setWebhook" \
-H "Content-Type: application/json" \
-d '{"url":"https://news.vanityontour.de/telegram/webhook","allowed_updates":["message","callback_query"],"secret_token":"RWWAaBwfCUX9Y573JVkB9zAeloHsZZoruXOBBgUtsvU"}'
```
Vollständige Dokumentation: `projects/webhook/telegram-webhook-reset.md`
## Backups
- SQLite-Dump taeglich
- Konfiguration und `.env` sicher sichern