Skip to content

Commit 5f66fb8

Browse files
authored
Merge pull request #337 from mrgnlabs/feature/add-tx-crawler-retry
Add Retries to the TX Crawler
2 parents 600c45c + b4984fa commit 5f66fb8

File tree

3 files changed

+212
-107
lines changed

3 files changed

+212
-107
lines changed

crates/cli/templates/project.askama

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,19 @@ pub async fn main() -> CarbonResult<()> {
8080
{%- endif %}
8181

8282
{%- if data_source.module_name == "rpc_transaction_crawler" %}
83+
let connection_config = ConnectionConfig::new(
84+
100, // Batch limit
85+
Duration::from_secs(5), // Polling interval
86+
5, // Max Concurrent Requests
87+
RetryConfig::default(), // Retry config
88+
);
89+
8390
let datasource = RpcTransactionCrawler::new(
8491
env::var("RPC_URL").unwrap_or_default(), // RPC URL
8592
METEORA_PROGRAM_ID, // The test account
86-
100, // Batch limit
87-
Duration::from_secs(5), // Polling interval
93+
connection_config, // Connection config
8894
filters, // Filters
8995
Some(solana_sdk::commitment_config::CommitmentConfig::finalized()), // Commitment config
90-
5, // Max Concurrent Requests
9196
);
9297
{%- endif %}
9398

0 commit comments

Comments
 (0)