Skip to content

Commit

Permalink
Add a sleep statement to Batch publication errors to prevent log floo…
Browse files Browse the repository at this point in the history
…ding/node hammering
  • Loading branch information
kayabaNerve committed Oct 12, 2023
1 parent f847ac7 commit f25f5cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coordinator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ async fn handle_processor_messages<D: Db, Pro: Processors, P: P2p>(
);
// If we failed to publish it, restore it
batches.push_front(batch);
// Sleep for a few seconds before retrying to prevent hammering the node
tokio::time::sleep(Duration::from_secs(5)).await;
}
}

Expand Down

0 comments on commit f25f5cd

Please sign in to comment.