diff --git a/src/processes/post_indexer.rs b/src/processes/post_indexer.rs index 40fc4a6..01871f2 100644 --- a/src/processes/post_indexer.rs +++ b/src/processes/post_indexer.rs @@ -103,8 +103,8 @@ impl CommitProcessor for PostIndexer { if commit.seq % 20 == 0 { info!( - "Updating cursor for {} to {}", - self.config.feed_generator_did, commit.seq + "Updating cursor for {} to {} ({})", + self.config.feed_generator_did, commit.seq, commit.time ); self.database .update_subscription_cursor(&self.config.feed_generator_did, commit.seq) diff --git a/src/services/bluesky/streaming.rs b/src/services/bluesky/streaming.rs index 8ba0084..d84e879 100644 --- a/src/services/bluesky/streaming.rs +++ b/src/services/bluesky/streaming.rs @@ -3,6 +3,7 @@ use std::collections::{HashMap, HashSet}; use anyhow::Result; use async_trait::async_trait; use atrium_api::com::atproto::sync::subscribe_repos::{Commit, Message}; +use chrono::{DateTime, Utc}; use super::{ decode::{read_record, FollowRecord, LikeRecord, PostRecord}, @@ -23,6 +24,7 @@ pub trait CommitProcessor { pub struct CommitDetails { pub seq: i32, + pub time: DateTime, pub operations: Vec, } @@ -70,6 +72,7 @@ pub async fn handle_message(message: &[u8], processor: &P) - processor .process_commit(&CommitDetails { seq: commit.seq, + time: commit.time.parse()?, operations, }) .await?;