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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user