Round-robin: rotate by channel instead of by source
Source-keyed rotation skewed toward whichever channel had the most feeds (4 of 7 sources routed to politics, so politics dominated the rotation). Channel-keyed rotation guarantees variety regardless of feed counts. Schema: round_robin_state.last_source -> last_channel, added via addColumnIfMissing so existing DBs migrate in place.
This commit is contained in:
@@ -42,7 +42,7 @@ CREATE TABLE IF NOT EXISTS post_log (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS round_robin_state (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1),
|
||||
last_source TEXT,
|
||||
last_channel TEXT,
|
||||
last_tick_at INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user