Corrected mentions by adding unique contraint to avoid duplicates.

This commit is contained in:
2025-07-31 23:25:10 +02:00
parent 7fec7ec740
commit 1aaa2d70a0
2 changed files with 23 additions and 8 deletions

View File

@@ -110,6 +110,7 @@ def _process_submission(submission, subreddit_id, conn, comment_limit):
"post",
int(submission.created_utc),
post_sentiment,
comment_id=None,
)
# 3. --- Process Comments (Single, Efficient Loop) ---
@@ -132,6 +133,7 @@ def _process_submission(submission, subreddit_id, conn, comment_limit):
"comment",
int(comment.created_utc),
comment_sentiment,
comment_id=comment.id,
)
else:
# If no title tickers, we must scan the comment for direct mentions.
@@ -156,6 +158,7 @@ def _process_submission(submission, subreddit_id, conn, comment_limit):
"comment",
int(comment.created_utc),
comment_sentiment,
comment_id=comment.id,
)
# 4. --- Save Deep Dive Analysis ---