Skip to content

Commit

Permalink
docs: additional comments on client.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbrayo committed Jul 3, 2024
1 parent 047dd4e commit 7b860bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async fn main() {
let bucket_id = format!("test-client-bucket_{}", aw_client.hostname);
let event_type = "dummy_data".to_string();

// Note that in a real application, you would want to handle these errors
create_bucket(&aw_client, bucket_id.clone(), event_type)
.await
.unwrap();
Expand Down Expand Up @@ -60,6 +61,7 @@ async fn main() {
.unwrap();

// Sleep a second until next heartbeat (eventually drifts due to time spent in the loop)
// You could use wait on tokio intervals to avoid drift
tokio::time::sleep(tokio::time::Duration::from_secs_f64(sleeptime)).await;
}

Expand Down

0 comments on commit 7b860bd

Please sign in to comment.