It seems that blog_sync_external_entries(), in charge of getting one rss source doesn't sync selectively but, instead, deletes all the entries and load all them again.
This have 2 important side effects:
- Order can become garbled, as far as post date fallbacks to time(), so we can be pushing external entries up all the time, causing nightmares to own generated rss, visualization...
- Old external entries are lost. Once the rss source stop publishing one item, it disappears from moodle too. That shouldn't happen.
So we need to read the rss and then, comparing by dates, by hash, or by content (or fallbacking between them), decide which entries must be inserted, but never deleting old ones.