Skip to content

Commit

Permalink
Merge pull request #19 from isankadn/dev
Browse files Browse the repository at this point in the history
remove some debug points
  • Loading branch information
isankadn authored Mar 24, 2024
2 parents e5ebfab + 6026333 commit f69ff45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions historical_data/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ async fn process_tenant_historical_data(
let batch_size = app_state.config.batch_size;
let num_batches = (total_docs as f64 / batch_size as f64).ceil() as u64;

// Create a channel to send batches of documents
let (sender, receiver) = tokio::sync::mpsc::unbounded_channel();

// Spawn a fixed number of worker tasks
let num_workers = 4;
let mut receivers: Vec<tokio::sync::mpsc::UnboundedReceiver<Vec<(String, String)>>> =
Vec::new();
Expand Down Expand Up @@ -158,7 +156,6 @@ async fn process_tenant_historical_data(

match mongo_collection.find(None, options).await {
Ok(mut cursor) => {
// Process documents and send batches to the channel
let mut batch = Vec::with_capacity(batch_size as usize);
while let Some(result) = cursor.next().await {
if let Ok(doc) = result {
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async fn process_tenant_records(
let mut change_stream = mongo_collection.watch(None, change_stream_options).await?;

while let Some(result) = change_stream.next().await {
println!(">>--- Change event: {:?}", result);
// println!(">>--- Change event: {:?}", result);
match result {
Ok(change_event) => {
if let ChangeStreamEvent {
Expand Down Expand Up @@ -347,7 +347,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
postgres_pool,
clickhouse_pools,
});
println!("app_state_main {:?}", app_state);
// println!("app_state_main {:?}", app_state);
let _ = run(app_state).await;
tokio::signal::ctrl_c()
.await
Expand Down

0 comments on commit f69ff45

Please sign in to comment.