VijayantSoni commented on a change in pull request #8701: URL: https://github.com/apache/airflow/pull/8701#discussion_r475083397
########## File path: airflow/providers/amazon/aws/hooks/elasticache_replication_group.py ########## @@ -0,0 +1,279 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from time import sleep + +from airflow.exceptions import AirflowException +from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook + + +class ElastiCacheReplicationGroupHook(AwsBaseHook): + """ + Interact with AWS ElastiCache + + :param max_retries: Max retries for checking availability of and deleting replication group + :type max_retries: int + :param exponential_back_off_factor: Factor for deciding next sleep time + :type exponential_back_off_factor: float + :param initial_poke_interval: Initial sleep time in seconds + :type initial_poke_interval: float + """ + + TERMINAL_STATES = frozenset({"available", "create-failed", "deleting"}) + + def __init__( + self, max_retries=10, exponential_back_off_factor=1, initial_poke_interval=60, *args, **kwargs + ): + """ + + """ Review comment: my bad, missed this. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
