Remove Instructions/Feedback + lp_profiles; sync retry, purge, mobile fixes (v0.1.0:104)
Removals (net -570 lines): - Delete the Instructions and Feedback (feature_requests) pages + backend. - Retire lp_profiles + investor_type across server, ingest, and seeds; migration 0008 drops both empty tables (a sanctioned one-off exception to never-hard-delete). 0001's lp_profiles ALTER is removed so a fresh DB doesn't break the migration chain (live DBs already applied it). Fixes: - Email sync: a transient timeout no longer terminally parks a mailbox; the scheduler retries 'retrying' each cycle and re-includes errored accounts on an hourly backoff, so stuck mailboxes self-heal. - Mobile Contacts: page through the full directory (server caps 500/page) -- one fetch silently truncated at 720, hiding people from the list and from search. - Mobile email review: clock icon to set a reminder inline; approval cards show date/time. New: - Admin-only purge of soft-deleted rows (Settings -> Admin; type-to-confirm, refuses any row still linked to live data). Tests: 45/45 (adds test_sync_ready + test_purge_soft_deleted). Reviewer pass applied (NULL reminders.contact_id on contact purge). Bumped to v0.1.0:104.
This commit is contained in:
@@ -23,6 +23,7 @@ import logging
|
||||
import sqlite3
|
||||
import traceback
|
||||
from typing import Optional
|
||||
from urllib.error import URLError
|
||||
|
||||
from . import attachments as _attach
|
||||
from . import config as _cfg
|
||||
@@ -112,6 +113,15 @@ def sync_account(conn_factory, credential_provider, account,
|
||||
error_str = "history expired; fallback to date backfill"
|
||||
status = "partial"
|
||||
_fallback_date_backfill(conn_factory, client, account, index, run_stats)
|
||||
except (_errors.RateLimitError, _errors.TransientError, URLError, TimeoutError) as e:
|
||||
# A network / 5xx / rate-limit error that outlived the in-pass retry loop.
|
||||
# This is TRANSIENT, not terminal: park it as 'retrying' (which the scheduler
|
||||
# still picks up every cycle) instead of 'error' (which it excludes). Fixes the
|
||||
# v<=0.1.0:103 bug where a single timeout dark-listed a mailbox until a manual
|
||||
# kick. Terminal causes (auth, permanent, unexpected) still fall through to 'error'.
|
||||
error_str = f"transient: {type(e).__name__}: {e}"
|
||||
status = "retrying"
|
||||
log.warning("transient error during sync of %s: %s", email_addr, e)
|
||||
except Exception as e:
|
||||
error_str = f"unexpected: {type(e).__name__}: {e}"
|
||||
status = "error"
|
||||
|
||||
Reference in New Issue
Block a user