Skip to content

Commit 0f483a7

Browse files
SNOW-2043816: storage py
1 parent c4ba926 commit 0f483a7

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

src/snowflake/connector/storage_client.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from .encryption_util import EncryptionMetadata, SnowflakeEncryptionUtil
2727
from .errors import RequestExceedMaxRetryError
2828
from .file_util import SnowflakeFileUtil
29-
from .http_interceptor import HttpInterceptor, InterceptOnMixin, RequestDTO
29+
from .http_interceptor import HttpInterceptor, InterceptOnMixin
3030
from .vendored import requests
3131
from .vendored.requests import ConnectionError, Timeout
3232
from .vendored.urllib3 import HTTPResponse
@@ -314,39 +314,15 @@ def _send_request_with_retry(
314314

315315
if self.retry_count[retry_id] < self.max_retry:
316316
url, rest_kwargs = get_request_args()
317-
headers = rest_kwargs.get("headers")
318-
319-
request_info = RequestDTO(url=url, method=rest_call, headers=headers)
320-
self._intercept_on(
321-
HttpInterceptor.InterceptionHook.ONCE_BEFORE_REQUEST, request_info
322-
)
323-
324317
request_args_generator = generate_values_from_beginning(
325318
url, rest_kwargs, original_function=get_request_args
326319
)
327320

328-
# ...TODO
329-
# TODO: this url is wrong
330-
# request = RequestDTO(url=url, method=rest_call, headers=rest_kwargs.get('headers')
331-
# self._intercept_on(HttpInterceptor.InterceptionHook.ONCE_BEFORE_REQUEST, request)
332-
# ...
333-
334-
# TODO: here add
335321
while self.retry_count[retry_id] < self.max_retry:
336-
#
337-
# if self.retry_count[retry_id] == 0:
338-
# url, rest_kwargs = get_request_args()
339-
340322
logger.debug(f"retry #{self.retry_count[retry_id]}")
341323
cur_timestamp = self.credentials.timestamp
342324
url, rest_kwargs = next(request_args_generator)
343325

344-
headers = rest_kwargs.get("headers")
345-
request_info = RequestDTO(url=url, method=verb, headers=headers)
346-
self._intercept_on(
347-
HttpInterceptor.InterceptionHook.BEFORE_EACH_RETRY, request_info
348-
)
349-
350326
rest_kwargs["timeout"] = (REQUEST_CONNECTION_TIMEOUT, REQUEST_READ_TIMEOUT)
351327
try:
352328
if conn:

0 commit comments

Comments
 (0)