inden
This commit is contained in:
@@ -3334,18 +3334,21 @@ def sync_feeds(args):
|
|||||||
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
||||||
|
|
||||||
browser.close()
|
browser.close()
|
||||||
except Exception as e:
|
|
||||||
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
|
||||||
|
|
||||||
browser.close()
|
except Exception as e:
|
||||||
|
logging.error(f"❌ Failed to post tweet to Bluesky: {e}")
|
||||||
|
|
||||||
# This must be indented 8 spaces (inside the try block)
|
# 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.")
|
||||||
|
|
||||||
# This must be indented 4 spaces (matches the 'try:' at the top of sync_feeds)
|
# Catches fatal sync errors (Indented 4 spaces, matches the 'try:' at the very 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}")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user