Skip to content

Conversation

@dimacurrentai
Copy link
Contributor

No description provided.

Copy link
Collaborator

@trueaywee trueaywee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Duration::from* calls can be made a bit nicer.


let mut con = client.get_multiplexed_async_connection().await?;

let timeout = async || sleep(Duration::from_millis((1e3 * args.subscribe_for_seconds).round() as u64)).await;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let timeout = async || sleep(Duration::from_secs_f64(args.subscribe_for_seconds)).await;

if !optionally_published {
optionally_published = true;
if let Some(delay) = args.and_publish_in_seconds {
sleep(Duration::from_millis((1e3 * delay).round() as u64)).await;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sleep(Duration::from_secs_f64(delay)).await;

@dkorolev dkorolev merged commit f4b71b5 into dkorolev:main Apr 22, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants