Skip to content

Commit

Permalink
fix(core): sleep time
Browse files Browse the repository at this point in the history
  • Loading branch information
remiroyc committed Sep 6, 2023
1 parent 5fb8e0c commit a050625
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/core/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,19 @@ pub async fn process_blocks_continuously(
}
Err(_err) => {
error!("Error processing block: {:?}", current_block_number);
sleep(Duration::from_secs(10)).await;
}
}
} else {
info!("No event to process for block {:?}", current_block_number);
update_block(dynamo_client, current_block_number, true).await?;
current_block_number += 1;
}
} else {
// If END_BLOCK is set, exit the loop, otherwise wait for more blocks
match env::var("END_BLOCK") {
Ok(_) => break,
Err(_) => sleep(Duration::from_secs(10)).await,
}
}

// If END_BLOCK is set, exit the loop, otherwise wait for more blocks
match env::var("END_BLOCK") {
Ok(_) => break,
Err(_) => sleep(Duration::from_secs(5)).await,
}
}

Expand Down

0 comments on commit a050625

Please sign in to comment.