This repository was archived by the owner on May 21, 2026. It is now read-only.
feat: Add adaptive post spacing to prevent feed floodingPost interval#486
Open
rmdes wants to merge 3 commits into
Open
feat: Add adaptive post spacing to prevent feed floodingPost interval#486rmdes wants to merge 3 commits into
rmdes wants to merge 3 commits into
Conversation
reamaining 1 Including the just-posted item in the calculation ensures the spacing window accounts for all posts in the sequence, which is especially important for small queues where the difference between dividing by 2 versus 3 significantly affects the delay.
Author
|
@milanmdev Alright, I think this is now better and clear, let me know what you think, i'm already testing this since several months and it works really well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the queue has multiple posts (e.g., 10 items), they all publish within seconds, flooding followers' feeds.
Solution
Adds adaptive spacing that dynamically calculates delays between posts based on queue size.
New Configuration Options
adaptiveSpacingfalsespacingWindow600minSpacing1maxSpacing60How It Works
The delay between posts is calculated as:
spacingWindow / queueSize, clamped betweenminSpacingandmaxSpacing.Example with defaults (
spacingWindow: 600,minSpacing: 1,maxSpacing: 60):This means:
spacingWindow: 600takes ~10 minutes to fully publishThe
minSpacingandmaxSpacingbounds prevent edge cases: extremely long waits for small queues, or spam-like bursts for huge queues.