Skip to content

Commit

Permalink
chore: attempt to optimize tokio scheduler (#342)
Browse files Browse the repository at this point in the history
* chore: attempt to optimize tokio scheduler

* fix: reduce amount of connections on controlled tests

* chore: dont mess with connections
  • Loading branch information
renancloudwalk authored Mar 13, 2024
1 parent 43ecd4f commit cb5cb6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bin/importer_offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const BACKLOG_SIZE: usize = 50;

type BacklogTask = (Vec<BlockRow>, Vec<ReceiptRow>);

#[tokio::main(flavor = "current_thread")]
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// init services
let config: ImporterOfflineConfig = init_global_services();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_import_offline_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async fn test_import_offline_snapshot() {
// init snapshot data
let snapshot_json = include_str!("fixtures/block-292973/snapshot.json");
let snapshot: InMemoryPermanentStorageState = serde_json::from_str(snapshot_json).unwrap();
let pg = Postgres::new(docker.postgres_connection_url(), 100usize, 2usize).await.unwrap();
let pg = Postgres::new(docker.postgres_connection_url(), 10usize, 2usize).await.unwrap();
populate_postgres(&pg, snapshot).await;

// init executor and execute
Expand Down

0 comments on commit cb5cb6f

Please sign in to comment.