Skip to content

Commit

Permalink
no temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Sep 27, 2024
1 parent b708081 commit 7758cf9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/torii/core/src/sql_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use starknet::core::utils::{get_contract_address, get_selector_from_name};
use starknet::providers::jsonrpc::HttpTransport;
use starknet::providers::{JsonRpcClient, Provider};
use starknet_crypto::poseidon_hash_many;
use tempfile::NamedTempFile;
use tokio::sync::broadcast;

use crate::engine::{Engine, EngineConfig, Processors};
Expand All @@ -32,9 +31,7 @@ use crate::processors::store_update_record::StoreUpdateRecordProcessor;
use crate::sql::Sql;

pub async fn setup_sqlite_pool() -> Result<SqlitePool, Box<dyn std::error::Error>> {
let tempfile = NamedTempFile::new().unwrap();
let path = tempfile.path().to_string_lossy();
let options = SqliteConnectOptions::from_str(&path).unwrap().create_if_missing(true);
let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true);
let pool = SqlitePoolOptions::new()
.min_connections(1)
.idle_timeout(None)
Expand Down

0 comments on commit 7758cf9

Please sign in to comment.