Cargo fix

This commit is contained in:
Cameron
2026-01-05 10:24:12 -05:00
parent ad07f5a1fa
commit bb23e6bb25
12 changed files with 204 additions and 122 deletions

View File

@@ -100,31 +100,31 @@ impl SmsApiClient {
.timestamp();
let end_ts = chrono::Utc::now().timestamp();
log::info!(
"Fetching all historical messages for contact: {}",
contact
);
log::info!("Fetching all historical messages for contact: {}", contact);
let mut all_messages = Vec::new();
let mut offset = 0;
let limit = 1000; // Fetch in batches of 1000
loop {
log::debug!("Fetching batch at offset {} for contact {}", offset, contact);
log::debug!(
"Fetching batch at offset {} for contact {}",
offset,
contact
);
let batch = self.fetch_messages_paginated(
start_ts,
end_ts,
Some(contact),
None,
limit,
offset
).await?;
let batch = self
.fetch_messages_paginated(start_ts, end_ts, Some(contact), None, limit, offset)
.await?;
let batch_size = batch.len();
all_messages.extend(batch);
log::debug!("Fetched {} messages (total so far: {})", batch_size, all_messages.len());
log::debug!(
"Fetched {} messages (total so far: {})",
batch_size,
all_messages.len()
);
// If we got fewer messages than the limit, we've reached the end
if batch_size < limit {