ashb commented on code in PR #56866:
URL: https://github.com/apache/airflow/pull/56866#discussion_r2447524237
##########
airflow-core/tests/unit/models/test_taskinstance.py:
##########
@@ -683,6 +683,32 @@ def test_next_retry_datetime_short_or_zero_intervals(self,
dag_maker, seconds):
date = ti.next_retry_datetime()
assert date == ti.end_date + datetime.timedelta(seconds=1)
+ def test_next_retry_datetime_with_custom_multiplier(self, dag_maker):
+ delay = datetime.timedelta(minutes=4)
+
+ with dag_maker(dag_id="fail_dag"):
+ task = BashOperator(
+ task_id="task_with_custom_multiplier",
+ bash_command="exit 1",
+ retries=3,
+ retry_delay=delay,
+ retry_exponential_backoff=True,
+ retry_delay_multiplier=5.0,
+ )
Review Comment:
Yeah, I think this would be nicer as
```suggestion
task = BashOperator(
task_id="task_with_custom_multiplier",
bash_command="exit 1",
retries=3,
retry_delay=delay,
retry_exponential_backoff=5,
)
```
(i.e. needing to specify two variables feels clunky)
--
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]