s/remote_(buffer|ratelimit)/upload_(buffer/ratelimit)/g

This commit is contained in:
Thomas Waldmann 2021-04-16 15:48:10 +02:00
parent 40e4aa085f
commit 6b838febe8
2 changed files with 6 additions and 6 deletions

View File

@ -2745,13 +2745,13 @@ class Archiver:
help='set umask to M (local only, default: %(default)04o)')
add_common_option('--remote-path', metavar='PATH', dest='remote_path',
help='use PATH as borg executable on the remote (default: "borg")')
add_common_option('--remote-ratelimit', metavar='RATE', dest='remote_ratelimit', type=int,
add_common_option('--remote-ratelimit', metavar='RATE', dest='upload_ratelimit', type=int,
help='deprecated, use --upload-ratelimit')
add_common_option('--upload-ratelimit', metavar='RATE', dest='remote_ratelimit', type=int,
add_common_option('--upload-ratelimit', metavar='RATE', dest='upload_ratelimit', type=int,
help='set network upload rate limit in kiByte/s (default: 0=unlimited)')
add_common_option('--remote-buffer', metavar='UPLOAD_BUFFER', dest='remote_buffer', type=int,
add_common_option('--remote-buffer', metavar='UPLOAD_BUFFER', dest='upload_buffer', type=int,
help='deprecated, use --upload-buffer')
add_common_option('--upload-buffer', metavar='UPLOAD_BUFFER', dest='remote_buffer', type=int,
add_common_option('--upload-buffer', metavar='UPLOAD_BUFFER', dest='upload_buffer', type=int,
help='set network upload buffer size in MiB. (default: 0=no buffer)')
add_common_option('--consider-part-files', dest='consider_part_files', action='store_true',
help='treat part files like normal files (e.g. to list/extract them)')

View File

@ -543,8 +543,8 @@ class RemoteRepository:
self.responses = {}
self.async_responses = {}
self.shutdown_time = None
self.ratelimit = SleepingBandwidthLimiter(args.remote_ratelimit * 1024 if args and args.remote_ratelimit else 0)
self.upload_buffer_size_limit = args.remote_buffer * 1024 * 1024 if args and args.remote_buffer else 0
self.ratelimit = SleepingBandwidthLimiter(args.upload_ratelimit * 1024 if args and args.upload_ratelimit else 0)
self.upload_buffer_size_limit = args.upload_buffer * 1024 * 1024 if args and args.upload_buffer else 0
self.unpacker = get_limited_unpacker('client')
self.server_version = parse_version('1.0.8') # fallback version if server is too old to send version information
self.p = None