fix(embeddings): remove stale CONTENT_MAX_CHARS import from rss.py

CONTENT_MAX_CHARS was removed from rss.py when the article content cap
was lifted. backfill_rss_article_content still referenced it, causing an
ImportError on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 22:04:10 -04:00
parent c8c0de3b04
commit 3bdadaeca8
+3 -3
View File
@@ -310,7 +310,7 @@ async def backfill_rss_article_content() -> None:
typical of feed summaries/teasers rather than full articles.
Runs at startup after the embedding backfill.
"""
from fabledassistant.services.rss import _fetch_full_article, CONTENT_MAX_CHARS
from fabledassistant.services.rss import _fetch_full_article
from fabledassistant.models.rss_feed import RssFeed
SHORT_THRESHOLD = 1000
@@ -348,9 +348,9 @@ async def backfill_rss_article_content() -> None:
async with async_session() as session:
item = await session.get(RssItem, item_id)
if item:
item.content = full_text[:CONTENT_MAX_CHARS]
item.content = full_text
await session.commit()
await upsert_rss_item_embedding(item_id, user_id, title or "", full_text[:CONTENT_MAX_CHARS])
await upsert_rss_item_embedding(item_id, user_id, title or "", full_text)
enriched += 1
except Exception:
logger.debug("Failed to store enriched content for item %d", item_id, exc_info=True)