fix double tweet

This commit is contained in:
2025-04-28 21:42:21 +10:00
parent ea7d36a22b
commit 8323744953
3 changed files with 43 additions and 17 deletions
+4 -3
View File
@@ -315,7 +315,8 @@ def curate_from_reddit():
image_source=image_source,
uploader=uploader,
pixabay_url=pixabay_url,
interest_score=interest_score
interest_score=interest_score,
post_tweet=True # Post the X tweet on the first call
)
finally:
is_posting = False
@@ -323,7 +324,6 @@ def curate_from_reddit():
if post_id:
cta = select_best_cta(post_data["title"], final_summary, post_url=post_url)
post_data["content"] = f"{final_summary}\n\n{cta}"
is_posting = True
try:
post_to_wp(
@@ -337,7 +337,8 @@ def curate_from_reddit():
uploader=uploader,
pixabay_url=pixabay_url,
interest_score=interest_score,
post_id=post_id
post_id=post_id,
post_tweet=False # Skip X tweet on the update call
)
finally:
is_posting = False