Skip to content

Commit

Permalink
Merge pull request #15 from Beauhurst/silence-deprecation-warning
Browse files Browse the repository at this point in the history
Explicitly set `secret_refresh_interval` to avoid triggering deprecation warning message
  • Loading branch information
amrishparmar authored Aug 31, 2023
2 parents 50a3a14 + 8e0050c commit 0243106
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion secrets_management/secrets_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class SecretsManager:
def __init__(self, region_name: str):
session = boto3.session.Session()
client = session.client(service_name="secretsmanager", region_name=region_name)
cache_config = SecretCacheConfig()
cache_config = SecretCacheConfig(
secret_refresh_interval=int(timedelta(hours=1).total_seconds()),
)
self.cache = SecretCache(config=cache_config, client=client)

def retrieve_secret(self, secret_name: str) -> Optional[Secret]:
Expand Down

0 comments on commit 0243106

Please sign in to comment.