Skip to content

Commit 51d72b7

Browse files
committed
--throttle should take a float, not an int
1 parent 683726a commit 51d72b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mycli/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,7 @@ class CliArgs:
21582158
help='Format for batch or --execute output.',
21592159
)
21602160
throttle: float = clickdc.option(
2161-
type=int,
2161+
type=float,
21622162
default=0.0,
21632163
help='Pause in seconds between queries in batch mode.',
21642164
)
@@ -2702,7 +2702,7 @@ def dispatch_batch_statements(statements: str, batch_counter: int) -> None:
27022702
sys.exit(1)
27032703
try:
27042704
if warn_confirmed:
2705-
if cli_args.throttle and batch_counter >= 1:
2705+
if cli_args.throttle > 0 and batch_counter >= 1:
27062706
sleep(cli_args.throttle)
27072707
mycli.run_query(statements, checkpoint=cli_args.checkpoint, new_line=True)
27082708
except Exception as e:

0 commit comments

Comments
 (0)