Corrected mentions by adding unique contraint to avoid duplicates.
This commit is contained in:
@@ -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 ---
|
||||
|
Reference in New Issue
Block a user