Skip to content

Commit

Permalink
fix: use gentle retry strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
zu1k committed Apr 18, 2024
1 parent be3adc0 commit b9779bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ config file template
"server": "http://10.0.0.1",
"strict_bind": false,
"double_stack": false,
"retry_delay": 300,
"retry_times": 10,
"retry_delay": 1000,
"retry_times": 3,
"n": 200,
"type": 1,
"acid": 12,
Expand Down
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"detect_ip": false,
"strict_bind": false,
"double_stack": false,
"retry_delay": 300,
"retry_times": 10,
"retry_delay": 1000,
"retry_times": 3,
"n": 200,
"type": 1,
"acid": 12,
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ fn single_login(matches: Matches) {
}

if let Some(retry_delay) = matches.opt_str("retry-delay") {
client.set_retry_delay(retry_delay.parse().unwrap_or(300));
client.set_retry_delay(retry_delay.parse().unwrap_or(1000));
}

if let Some(retry_times) = matches.opt_str("retry-times") {
client.set_retry_times(retry_times.parse().unwrap_or(10));
client.set_retry_times(retry_times.parse().unwrap_or(3));
}

if let Err(e) = client.login() {
Expand Down
4 changes: 2 additions & 2 deletions src/srun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ impl SrunClient {
utype: 1,
os: "Windows 10".to_string(),
name: "Windows".to_string(),
retry_delay: 300,
retry_times: 10,
retry_delay: 1000,
retry_times: 3,
..Default::default()
}
}
Expand Down

0 comments on commit b9779bb

Please sign in to comment.