From 5f1b7affd191036ad826ccf969821eb374453cab Mon Sep 17 00:00:00 2001 From: nubis Date: Fri, 7 Jun 2024 15:27:37 -0300 Subject: [PATCH] Only update checkpoint forwards --- README.md | 4 ++++ api/src/models/handle.rs | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e90dcf0..1acf2fc 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,8 @@ You can contact us by creating an issue here. - Store the last check date for existing X campaigns (?). We don't have more than one page of RT's though. - Force timeout if twitter API is irresponsive. +- Prune log entries over 2 months old. +- Prune skipped on-chain-jobs. +- Move Instagram logging to log-entries. +- Prune Instagram log entries. diff --git a/api/src/models/handle.rs b/api/src/models/handle.rs index 434ab93..2ef7b99 100644 --- a/api/src/models/handle.rs +++ b/api/src/models/handle.rs @@ -140,14 +140,16 @@ impl HandleHub { page = mentions.next_page().await?; } - indexer_state.update().x_handle_verification_checkpoint(checkpoint).save().await?; - self.state - .info( - "verify_and_score_x", - "done_processing_updating_indexer_state", - &checkpoint, - ) - .await; + if *indexer_state.x_handle_verification_checkpoint() < checkpoint { + indexer_state.update().x_handle_verification_checkpoint(checkpoint).save().await?; + self.state + .info( + "verify_and_score_x", + "done_processing_updating_indexer_state", + &checkpoint, + ) + .await; + } Ok(handles) } }