fix double tweet
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user