uranusjr commented on code in PR #33234:
URL: https://github.com/apache/airflow/pull/33234#discussion_r1292961995
##########
airflow/providers/http/hooks/http.py:
##########
@@ -363,8 +360,10 @@ async def run(
else:
raise AirflowException(f"Unexpected HTTP Method:
{self.method}")
- attempt_num = 1
- while True:
+ for attempt in range(1, 1 + self.retry_limit):
+ if attempt > 1:
+ await asyncio.sleep(self.retry_delay)
Review Comment:
Would it not work if the `sleep()` is called at the end of the loop instead?
This does a `return` when the condition is satisfied and would be able to
achieve the same without the `if` condition. Am I missing something?
--
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]