ashb commented on code in PR #44302:
URL: https://github.com/apache/airflow/pull/44302#discussion_r1856035039
##########
providers/src/airflow/providers/http/hooks/http.py:
##########
@@ -83,11 +87,25 @@ def __init__(
self.base_url: str = ""
self._retry_obj: Callable[..., Any]
self._auth_type: Any = auth_type
+
+ if adapter is not None and not isinstance(adapter, BaseAdapter):
+ raise TypeError("adapter must be an instance of
requests.adapters.BaseAdapter")
+ self.adapter = adapter
+
self.tcp_keep_alive = tcp_keep_alive
self.keep_alive_idle = tcp_keep_alive_idle
self.keep_alive_count = tcp_keep_alive_count
self.keep_alive_interval = tcp_keep_alive_interval
+ if self.tcp_keep_alive:
+ self.keep_alive_adapter = TCPKeepAliveAdapter(
+ idle=self.keep_alive_idle,
+ count=self.keep_alive_count,
+ interval=self.keep_alive_interval,
+ )
+ else:
+ self.keep_alive_adapter = None
Review Comment:
Ah just moved.
This doesn't make any network requests by creating it here does it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]