feat: apply fix/adapter-health-1-2-9 changes (unified retry, failure_class, RSS enabled)
- adapters/__init__.py: add http_get() unified retry helper + AdapterHTTPError + failure_class classification (429/5xx/4xx/error/zero_fetch/ok) + last_failure_class on SourceAdapter for pipeline capture - pipeline.py: ENABLED_SOURCES now includes RSS + failure_class rollup in run_log (most severe across all adapters) + per-source failure_class in source_stats - schema.sql: add failure_class column to run_log table Backport of fix/adapter-health-1-2-9 branch (issues #1, #2, #9).
This commit is contained in:
@@ -22,6 +22,8 @@ CREATE INDEX IF NOT EXISTS idx_entries_category ON entries(category_tags);
|
||||
-- Partial failures (e.g. Reddit rate-limited) are detectable here, not hidden
|
||||
-- as a "complete" run. Also enables future pruning decisions (entries older
|
||||
-- than N days with no re-fetch can be archived).
|
||||
-- failure_class (issue #2): one of 4xx / 5xx / 429 / zero_fetch / ok, derived
|
||||
-- from the real HTTP response via adapters.http_get, not guessed after the fact.
|
||||
CREATE TABLE IF NOT EXISTS run_log (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
run_time TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
|
||||
@@ -29,6 +31,7 @@ CREATE TABLE IF NOT EXISTS run_log (
|
||||
total_stored INTEGER DEFAULT 0,
|
||||
sources_ok TEXT, -- JSON list of sources that succeeded
|
||||
sources_failed TEXT, -- JSON list of sources that errored/skipped
|
||||
failure_class TEXT, -- 4xx / 5xx / 429 / zero_fetch / ok
|
||||
notes TEXT
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user