|
|
@@ -156,6 +156,11 @@ def single_impl(item_directory: pathlib.Path, ia_collection: str, ia_item_title: |
|
|
|
logging.info(f"Assigned target {url}") |
|
|
|
|
|
|
|
parsed_url = urllib.parse.urlparse(url) |
|
|
|
parsed_qs = urllib.parse.parse_qs(parsed_url.query) |
|
|
|
|
|
|
|
def get_q(key, default): |
|
|
|
return parsed_qs.get(key, [str(default)])[0] |
|
|
|
|
|
|
|
bf_item = None |
|
|
|
if parsed_url.scheme == "minio+http" or parsed_url.scheme == "minio+https": |
|
|
|
secure = (parsed_url.scheme == "minio+https") |
|
|
@@ -167,8 +172,8 @@ def single_impl(item_directory: pathlib.Path, ia_collection: str, ia_item_title: |
|
|
|
def create_client(): |
|
|
|
logging.info("Connecting to minio...") |
|
|
|
cert_check = True |
|
|
|
timeout = datetime.timedelta(seconds=30).seconds |
|
|
|
total_timeout = datetime.timedelta(seconds=60).seconds |
|
|
|
timeout = datetime.timedelta(seconds=int(get_q("timeout", 60))).seconds |
|
|
|
total_timeout = datetime.timedelta(seconds=int(get_q("total_timeout", timeout*2))).seconds |
|
|
|
hclient = urllib3.PoolManager( |
|
|
|
timeout=urllib3.util.Timeout(connect=timeout, read=timeout, total=total_timeout), |
|
|
|
maxsize=10, |
|
|
|