Skip to content

Commit

Permalink
There are valid use cases for retrying even on local disk.
Browse files Browse the repository at this point in the history
  • Loading branch information
whoschek committed Jul 26, 2024
1 parent 1b6f911 commit 0a07088
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions wbackup_zfs/wbackup_zfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ def __init__(self, args: argparse.Namespace, sys_argv: Optional[List[str]] = Non
self.max_elapsed_nanos = int(self.max_elapsed_secs * 1000_000_000)
self.min_sleep_nanos = max(1, self.min_sleep_nanos)
self.max_sleep_nanos = max(self.min_sleep_nanos, self.max_sleep_nanos)
self.debug_retries = self.getenv_bool('debug_retries', False)
self.is_test_mode = args.is_test_mode

self.available_programs = {}
Expand Down Expand Up @@ -576,9 +575,6 @@ def validate(self):
die(f"Source and destination dataset trees must not overlap! "
f"src: {p.origin_src_root_dataset}, dst: {p.origin_dst_root_dataset}")

if params.ssh_src_user_host == "" and params.ssh_dst_user_host == "" and params.debug_retries is False:
params.max_retries = 0 # no need to retry transfer from local disk to local disk

re_suffix = r'(?:/.*)?' # also match descendants of a matching dataset
exclude_regexes = self.dataset_regexes(p.args.exclude_dataset or []) + (p.args.exclude_dataset_regex or [])
include_regexes = self.dataset_regexes(p.args.include_dataset or []) + (p.args.include_dataset_regex or [])
Expand Down

0 comments on commit 0a07088

Please sign in to comment.