Fix pending: OutOfSync to supercede NotPublishedRecently.

Fixes #714
This commit is contained in:
Mike Dilger 2024-04-16 13:35:06 +12:00
parent b8938d1c5f
commit 015d80de7d

View File

@ -263,15 +263,6 @@ impl Pending {
self.remove(&PendingItem::PersonListNeverPublished(*list)); self.remove(&PendingItem::PersonListNeverPublished(*list));
} }
// If 90 days old, should be re-synced
if metadata.event_created_at.0 + t90days < now.0 {
self.insert(PendingItem::PersonListNotPublishedRecently(*list));
continue;
} else {
self.remove(&PendingItem::PersonListNotPublishedRecently(*list));
// remove if present
}
// If mismatched, should be re-synced // If mismatched, should be re-synced
let stored_hash = GLOBALS.storage.hash_person_list(*list)?; let stored_hash = GLOBALS.storage.hash_person_list(*list)?;
let last_event_hash = crate::people::hash_person_list_event(*list)?; let last_event_hash = crate::people::hash_person_list_event(*list)?;
@ -281,6 +272,15 @@ impl Pending {
} else { } else {
self.remove(&PendingItem::PersonListOutOfSync(*list)); // remove if present self.remove(&PendingItem::PersonListOutOfSync(*list)); // remove if present
} }
// If 90 days old, should be re-synced
if metadata.event_created_at.0 + t90days < now.0 {
self.insert(PendingItem::PersonListNotPublishedRecently(*list));
continue;
} else {
self.remove(&PendingItem::PersonListNotPublishedRecently(*list));
// remove if present
}
} }
{ {