TakayukiTanabeSS commented on code in PR #45228:
URL: https://github.com/apache/airflow/pull/45228#discussion_r1901929072
##########
providers/src/airflow/providers/http/hooks/http.py:
##########
@@ -410,54 +411,53 @@ async def run(
url = _url_from_endpoint(self.base_url, endpoint)
- async with aiohttp.ClientSession() as session:
- if self.method == "GET":
- request_func = session.get
- elif self.method == "POST":
- request_func = session.post
- elif self.method == "PATCH":
- request_func = session.patch
- elif self.method == "HEAD":
- request_func = session.head
- elif self.method == "PUT":
- request_func = session.put
- elif self.method == "DELETE":
- request_func = session.delete
- elif self.method == "OPTIONS":
- request_func = session.options
- else:
- raise AirflowException(f"Unexpected HTTP Method:
{self.method}")
-
- for attempt in range(1, 1 + self.retry_limit):
- response = await request_func(
+ if self.method == "GET":
+ request_func = session.get
+ elif self.method == "POST":
+ request_func = session.post
+ elif self.method == "PATCH":
+ request_func = session.patch
+ elif self.method == "HEAD":
+ request_func = session.head
+ elif self.method == "PUT":
+ request_func = session.put
+ elif self.method == "DELETE":
+ request_func = session.delete
+ elif self.method == "OPTIONS":
+ request_func = session.options
+ else:
+ raise AirflowException(f"Unexpected HTTP Method: {self.method}")
Review Comment:
https://github.com/apache/airflow/pull/45228/commits/b4d0b8827c70af8ad663a1d54f46118c3fe80ad2
The above has been resolved!
--
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]