Skip to content

Commit

Permalink
Use humantime in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
inahga committed Apr 12, 2024
1 parent 8c08570 commit ba8e981
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub enum TaskAction {
#[arg(long)]
max_batch_size: Option<u64>,
#[arg(long, requires = "max_batch_size")]
batch_time_window_size_seconds: Option<u64>,
batch_time_window_size: Option<Duration>,
#[arg(long)]
time_precision: Duration,
#[arg(long)]
Expand Down Expand Up @@ -74,7 +74,7 @@ impl TaskAction {
vdaf,
min_batch_size,
max_batch_size,
batch_time_window_size_seconds,
batch_time_window_size,
time_precision,
collector_credential_id,
categorical_buckets,
Expand Down Expand Up @@ -124,6 +124,8 @@ impl TaskAction {
};

let time_precision_seconds = time_precision.as_secs();
let batch_time_window_size_seconds =
batch_time_window_size.map(|window| window.as_secs());

let task = NewTask {
name,
Expand Down

0 comments on commit ba8e981

Please sign in to comment.