Skip to content

Commit fdb6904

Browse files
committed
cleanup
1 parent f400e01 commit fdb6904

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

synth/src/cli/mongo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ impl ExportStrategy for MongoExportStrategy {
159159
info!("Connecting to database at {} ...", &self.uri_string);
160160

161161
let mut client = Client::with_options(client_options)?;
162-
// let mut client = Client::with_uri_str(&self.uri_string)?;
163162

164163
match sample {
165164
SamplerOutput::Collection(name, value) => {

synth/src/datasource/mysql_datasource.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use rust_decimal::Decimal;
1010
use sqlx::mysql::{MySqlColumn, MySqlPoolOptions, MySqlRow};
1111
use sqlx::{Column, MySql, Pool, Row, TypeInfo};
1212
use std::collections::BTreeMap;
13-
use std::time::Duration;
1413
use synth_core::schema::number_content::{F64, I16, I32, I64, I8, U64};
1514
use synth_core::schema::{
1615
ChronoValueType, DateTimeContent, NumberContent, RangeStep, RegexContent, StringContent,
@@ -28,7 +27,6 @@ pub struct MySqlConnectParams {
2827
pub(crate) concurrency: usize,
2928
}
3029

31-
#[derive(Clone)]
3230
pub struct MySqlDataSource {
3331
pool: Pool<MySql>,
3432
concurrency: usize,
@@ -42,7 +40,6 @@ impl DataSource for MySqlDataSource {
4240
task::block_on(async {
4341
let pool = MySqlPoolOptions::new()
4442
.max_connections(connect_params.concurrency.try_into().unwrap())
45-
.acquire_timeout(Duration::from_secs(600))
4643
.connect(connect_params.uri.as_str())
4744
.await?;
4845

synth/src/datasource/relational_datasource.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ where
226226
collection_name
227227
);
228228

229-
let mut num_jobs = 0;
230-
231229
let semaphore = Arc::new(Semaphore::new(max_concurrency));
232230
for rows in collection_chunks {
233231
let permit = semaphore.clone().acquire_arc().await;
@@ -260,15 +258,10 @@ where
260258
drop(permit);
261259
result
262260
});
263-
num_jobs += 1;
264261

265262
futures.push(future);
266263
}
267264

268-
info!(
269-
"Waiting for {} jobs for collection {}...",
270-
num_jobs, collection_name
271-
);
272265
let results = join_all(futures).await;
273266

274267
if let Err(e) = results.into_iter().bcollect::<Vec<_>>() {

0 commit comments

Comments
 (0)