vandonr-amz commented on code in PR #32036:
URL: https://github.com/apache/airflow/pull/32036#discussion_r1237305526
##########
airflow/providers/amazon/aws/operators/batch.py:
##########
@@ -428,31 +431,40 @@ def __init__(
unmanaged_v_cpus: int | None = None,
service_role: str | None = None,
tags: dict | None = None,
- max_retries: int | None = None,
+ poll_interval: int = 30,
+ max_retries: int = 120,
status_retries: int | None = None,
aws_conn_id: str | None = None,
region_name: str | None = None,
+ deferrable: bool = True,
**kwargs,
):
super().__init__(**kwargs)
+ if status_retries is not None:
+ warnings.warn(
+ "The `status_retries` parameter is unused and should be
removed. "
+ "It'll be deleted in a future version.",
+ AirflowProviderDeprecationWarning,
+ stacklevel=2,
+ )
+
self.compute_environment_name = compute_environment_name
self.environment_type = environment_type
self.state = state
self.unmanaged_v_cpus = unmanaged_v_cpus
self.compute_resources = compute_resources
self.service_role = service_role
self.tags = tags or {}
+ self.poll_interval = poll_interval
self.max_retries = max_retries
- self.status_retries = status_retries
self.aws_conn_id = aws_conn_id
self.region_name = region_name
+ self.deferrable = deferrable
@cached_property
def hook(self):
"""Create and return a BatchClientHook."""
return BatchClientHook(
- max_retries=self.max_retries,
- status_retries=self.status_retries,
Review Comment:
oh, yeah, they are used only if you call some specific methods, and in this
operator we don't interact with hook methods, we only use it as a way to get
the underlying boto client.
--
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]