poetapp / wordpress-plugin

Automatically post to the Po.et Network from WordPress
https://wordpress.org/plugins/po-et/
GNU General Public License v2.0
49 stars 34 forks source link

Feature for backfill old published posts to Frost via cron. #39

Closed markparolisi closed 5 years ago

markparolisi commented 5 years ago

A few notes here:

  1. I'm using a cron because if a site has hundreds, thousands, or hundreds of thousands of posts, it will not be able to complete this backfill job in one process. So, this happens incrementally via a cron.
  2. Currently on master, the interface to push posts to Frost is an instance method, Poet_Public::post_article. So, in order to invoke it, one would have to declare a new instance of Post_Public. I've done the cheap "fix" now and made that member static, but Post_Public could also be changed to a singleton. Please don't use a global
  3. I'd like to add more info around this process. For example, how many posts are left to be backfilled. But, I'm keeping it simple right now and just following the protocol and layout I presently see for the admin page.

Fixes #8