Add round-robin posting mode

One story per interval_hours (default 4), cycling through enabled sources
in config order. Empty sources are skipped and the pointer advances to
whichever source actually posted. State persists across restarts.

Duplicate-flagged stories now get a _duplicate sentinel channel so they
stay out of the rotation pool alongside _discarded.
This commit is contained in:
prosolis
2026-05-22 19:58:46 -07:00
parent 69967b25c6
commit 3baec4c8bc
7 changed files with 451 additions and 2 deletions

View File

@@ -40,6 +40,12 @@ CREATE TABLE IF NOT EXISTS post_log (
posted_at INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS round_robin_state (
id INTEGER PRIMARY KEY CHECK (id = 1),
last_source TEXT,
last_tick_at INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE IF NOT EXISTS reactions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
post_guid TEXT NOT NULL,