Page MenuHomeMusing Studio

Federate scheduled posts
Open, NormalPublic

Description

Overview

Right now, scheduled posts simply show up on blogs when their created date is in the past. We should also send them out to the fediverse once their scheduled date has passed.

Implementation

If federation is enabled on an instance, upon application startup (or once federation is enabled while application is running):

  • Check database for all future posts
  • Store them in memory

At a regular interval:

  • Check stored list of posts, see if any dates are now in the past
    • If so, federate post and remove it from the list
  • Check database for all future posts
  • Store them in memory

Considerations

Depending on database size, the future posts check could be kind of heavy. Maybe as the database grows we increase the interval between checks.

If the interval is 1 minute, maybe upon startup we choose a random second of every minute to run the check on (or we just rely on the fact that the application will start up at different times).

Revisions and Commits

rWF WriteFreely

Related Objects