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:
@@ -22,7 +22,7 @@ func TestHandleReaction_KnownPost(t *testing.T) {
|
||||
setupTrackerTestDB(t)
|
||||
|
||||
// Insert a post log entry
|
||||
storage.InsertPostLog("story-1", "tech", "$post1:example.org", "")
|
||||
storage.InsertPostLog("story-1", "tech", "$post1:example.org", "", false)
|
||||
|
||||
// Handle a reaction to that post
|
||||
HandleReaction(
|
||||
@@ -63,7 +63,7 @@ func TestHandleReaction_UnknownPost(t *testing.T) {
|
||||
func TestHandleReaction_DuplicateIgnored(t *testing.T) {
|
||||
setupTrackerTestDB(t)
|
||||
|
||||
storage.InsertPostLog("story-1", "tech", "$post1:example.org", "")
|
||||
storage.InsertPostLog("story-1", "tech", "$post1:example.org", "", false)
|
||||
|
||||
// Send same reaction twice
|
||||
HandleReaction(
|
||||
|
||||
Reference in New Issue
Block a user