Update crates/federate/src/send.rs

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
federation-send-parallel
phiresky 2024-05-30 12:44:35 +02:00 committed by GitHub
parent a0b0a7a0d9
commit cdff275803
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,12 @@ pub(crate) struct SendSuccessInfo {
pub published: Option<DateTime<Utc>>,
pub was_skipped: bool,
}
// need to be able to order them for the binary heap in the worker
// order backwards by activity_id for the binary heap in the worker
impl PartialEq for SendSuccessInfo {
fn eq(&self, other: &Self) -> bool {
self.activity_id == other.activity_id
}
}
impl PartialOrd for SendSuccessInfo {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
other.activity_id.partial_cmp(&self.activity_id)