The following changes were made by the replace_file_content tool to: /root/MayaXSenderbot/bridge.py. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -2237,6 +2237,9 @@ if cutoff_ts: ws.last_processed_ts = max(0, cutoff_ts - 5000) self.save_workspace(ws) + elif seed.status in (401, 403, 404, 423): + await asyncio.sleep(20) + continue await asyncio.sleep(poll_interval) continue @@ -2243,5 +2243,8 @@ if r.status != 200: - await asyncio.sleep(poll_interval) + if r.status in (401, 403, 404, 423): + await asyncio.sleep(20) + else: + await asyncio.sleep(poll_interval) continue try: @@ -2289,8 +2289,13 @@ except asyncio.CancelledError: break except Exception as exc: - log(f"[fb poll {user_id}] {exc}") - await asyncio.sleep(poll_interval) + err_text = str(exc).lower() + if "name or service not known" in err_text or "cannot connect to host" in err_text or "nodename" in err_text: + log(f"[fb poll {user_id}] Host connection/lookup failed: {exc}. Backing off 30s...") + await asyncio.sleep(30) + else: + log(f"[fb poll {user_id}] {exc}") + await asyncio.sleep(max(2.0, poll_interval * 2)) def _latest_remote_ts(self, data: dict[str, Any]) -> int: latest_ts = 0 [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.