VeloxonHub Social has an Inbox that collects comments on your published posts from Facebook, Instagram, YouTube, Threads, Bluesky, Mastodon, DEV.to and WordPress, and lets you reply from one screen. Most of these networks don't push comments to you, so the Inbox is built on polling. Here's how we keep that cheap, correct and threaded.
Poll by post age, not on a fixed clock
Comments arrive fast while a post is new and almost stop after a couple of days. Polling every post every 15 minutes wastes quota: YouTube gives the whole app about 10,000 units a day, so a 15-minute comment poll for 14 days would cap us at roughly 100 videos.
So each published post has a cadence:
inboxCadence = repository . PollCadence { FreshFor : 2 * 24 * time . Hour , Fresh : 15 * time . Minute , Stale : 3 * time . Hour , MaxAge : 14 * 24 * time . Hour , }
Enter fullscreen mode
Exit fullscreen mode
Every 15 minutes for the first 2 days, then every 3 hours, and never after 14 days.β¦