// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use anyhow::Result;
use async_trait::async_trait;
use sui_data_ingestion_core::{setup_single_workflow, Worker};
use sui_types::full_checkpoint_content::CheckpointData;
struct CustomWorker;
#[async_trait]
impl Worker for CustomWorker {
type Result = ();
async fn process_checkpoint(&self, checkpoint: &CheckpointData) -> Result<()> {
// custom processing logic
// print out the checkpoint number
println!(
"Processing checkpoint: {}",
checkpoint.checkpoint_summary.to_string()
);
This file has been truncated. show original
Is this the fastest way to synchronize event data?
How much delay time there is in synchronizing the indexer here with the actual network’s data?
1 Like
Indeed processing checkpoints might have a small delay. Another way to get events possibly faster, is to poll for events from a Fullnode filtering for the needed events.
1 Like