Exclude !post from the daily cap
Manual !post overrides were counted toward daily_cap_total, so a few forced posts could starve the round-robin rotation for the rest of the day. Tag forced rows in post_log and skip them in CountAllPostsInWindow so the cap only meters the auto-rotation.
This commit is contained in:
@@ -156,7 +156,7 @@ func TestTick_AlreadyPostedExcluded(t *testing.T) {
|
||||
setupTestDB(t)
|
||||
insertPostable(t, "t-posted", "GuardianTech", "tech", 200)
|
||||
insertPostable(t, "t-fresh", "GuardianTech", "tech", 100)
|
||||
storage.InsertPostLog("t-posted", "tech", "$evt1", "https://example.com/t-posted")
|
||||
storage.InsertPostLog("t-posted", "tech", "$evt1", "https://example.com/t-posted", false)
|
||||
|
||||
fq := &fakeQueue{}
|
||||
rr := New([]string{"tech"}, 4, fq)
|
||||
|
||||
Reference in New Issue
Block a user