Add InitialFetchCount and Onward Date to populate Forums#91
Open
talDoFlemis wants to merge 10 commits intoQolors:masterfrom
Open
Add InitialFetchCount and Onward Date to populate Forums#91talDoFlemis wants to merge 10 commits intoQolors:masterfrom
talDoFlemis wants to merge 10 commits intoQolors:masterfrom
Conversation
…se a early return on when no post if found
…al count is not zero
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
This PR introduces a new optional feature that allows FeedCord to backfill recent posts when a feed worker first initializes. This is useful for populating a Discord channel with recent content when setting up a new feed instance, rather than only posting new items that arrive after initialization.
New Features
1. Initial Fetch Count (
InitialFetchCount)A new optional configuration property that specifies how many of the most recent posts to fetch when the feed worker first initializes.
Default Value:
0(disabled)2. Onward Date Filter (
OnwardDate)A new optional configuration property that works in conjunction with
InitialFetchCountto filter posts by publish date.Default Value:
null(no date filtering)Configuration Examples
Example 1: Basic Initial Fetch
Fetch the last 10 posts without date filtering:
{ "Instances": [ { "Id": "Tech News", "YoutubeUrls": [""], "RssUrls": ["https://example.com/feed.rss"], "DiscordWebhookUrl": "https://discord.com/api/webhooks/...", "RssCheckIntervalMinutes": 15, "Color": 8411391, "DescriptionLimit": 500, "Forum": true, "MarkdownFormat": false, "PersistenceOnShutdown": true, "InitialFetchCount": 10 } ], "ConcurrentRequests": 40 }Example 2: Date-Filtered Initial Fetch
Fetch up to 20 recent posts, but only those published after November 1st, 2025:
{ "Instances": [ { "Id": "Tech News", "YoutubeUrls": [""], "RssUrls": ["https://example.com/feed.rss"], "DiscordWebhookUrl": "https://discord.com/api/webhooks/...", "RssCheckIntervalMinutes": 15, "Color": 8411391, "DescriptionLimit": 500, "Forum": true, "MarkdownFormat": false, "PersistenceOnShutdown": true, "InitialFetchCount": 20, "OnwardDate": "2025-11-01T00:00:00" } ], "ConcurrentRequests": 40 }Example 3: Default Behavior (No Backfill)
When
InitialFetchCountis omitted or set to0, FeedCord operates as it always has:{ "Instances": [ { "Id": "Tech News", "YoutubeUrls": [""], "RssUrls": ["https://example.com/feed.rss"], "DiscordWebhookUrl": "https://discord.com/api/webhooks/...", "RssCheckIntervalMinutes": 15, "Color": 8411391, "DescriptionLimit": 500, "Forum": true, "MarkdownFormat": false, "PersistenceOnShutdown": true } ], "ConcurrentRequests": 40 }Documentation Updates
README.mdwith the new properties in the configuration example