Skip to content

Commit

Permalink
Only update checkpoint forwards
Browse files Browse the repository at this point in the history
  • Loading branch information
nubis committed Jun 7, 2024
1 parent 64df8ca commit 5f1b7af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

18 changes: 10 additions & 8 deletions api/src/models/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 5f1b7af

Please sign in to comment.