Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some debug points #19

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading