indented and fixed
This commit is contained in:
@@ -2819,7 +2819,6 @@ def candidate_matches_existing_bsky(candidate, recent_bsky_posts):
|
|||||||
|
|
||||||
return False, None
|
return False, None
|
||||||
|
|
||||||
|
|
||||||
# --- Main Sync Logic ---
|
# --- Main Sync Logic ---
|
||||||
def sync_feeds(args):
|
def sync_feeds(args):
|
||||||
logging.info("🔄 Starting sync cycle...")
|
logging.info("🔄 Starting sync cycle...")
|
||||||
@@ -3333,18 +3332,13 @@ def sync_feeds(args):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
||||||
|
|
||||||
|
# Closes Playwright browser (Indented 12 spaces, matches 'browser = ...')
|
||||||
browser.close()
|
browser.close()
|
||||||
|
|
||||||
except Exception as e:
|
# Logs final count (Indented 8 spaces, inside the main 'try' block)
|
||||||
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
|
||||||
|
|
||||||
# Closes the Playwright browser (Indented 12 spaces, matches 'browser = ...')
|
|
||||||
browser.close()
|
|
||||||
|
|
||||||
# Logs the final count (Indented 8 spaces, matches the 'with sync_playwright():' block)
|
|
||||||
logging.info(f"✅ Sync complete. Posted {new_posts} new updates.")
|
logging.info(f"✅ Sync complete. Posted {new_posts} new updates.")
|
||||||
|
|
||||||
# Catches fatal sync errors (Indented 4 spaces, matches the 'try:' at the very top of sync_feeds)
|
# Catches fatal sync errors (Indented 4 spaces, matches the 'try:' at the top of sync_feeds)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"❌ Error during sync cycle: {e}")
|
logging.error(f"❌ Error during sync cycle: {e}")
|
||||||
|
|
||||||
@@ -3431,3 +3425,4 @@ def main():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user