From 713a656c5fc1bdc619a978dd79c56da3e71cad8c Mon Sep 17 00:00:00 2001 From: Florian Charlaix Date: Wed, 9 Aug 2023 12:16:30 +0200 Subject: [PATCH] Add timeout configuration from args --- scripts/gf_migration.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/gf_migration.py b/scripts/gf_migration.py index 850494d..71a31c4 100644 --- a/scripts/gf_migration.py +++ b/scripts/gf_migration.py @@ -185,6 +185,8 @@ def main(): parser.add_argument("--memory-limit", type=int, default=100, help="The file size limit (MB) before using a file " \ "instead of RAM as buffer for upload/download") + parser.add_argument("--timeout", type=int, default=30, + help="The WebDav requests timeout in seconds") try: args = parser.parse_args() @@ -192,7 +194,8 @@ def main(): src_client = Client({ "webdav_hostname": args.src_host, "webdav_login": args.src_user, - "webdav_password": args.src_passwd + "webdav_password": args.src_passwd, + "webdav_timeout": args.timeout }) check = Migration.check_client(src_client, args.src_path) @@ -202,7 +205,8 @@ def main(): dest_client = Client({ "webdav_hostname": args.dest_host, "webdav_login": args.dest_user, - "webdav_password": args.dest_passwd + "webdav_password": args.dest_passwd, + "webdav_timeout": args.timeout }) check = Migration.check_client(dest_client, args.dest_path)