try/catch
This commit is contained in:
parent
9d92a17e76
commit
8011cd5e1d
|
|
@ -34,9 +34,13 @@ SMTP_PASS = os.environ.get('SMTP_PASS')
|
||||||
# Graceful shutdown
|
# Graceful shutdown
|
||||||
shutdown_requested = False
|
shutdown_requested = False
|
||||||
|
|
||||||
# DynamoDB Ressource (neu im Worker!)
|
# DynamoDB Ressource für Bounce-Lookup
|
||||||
|
try:
|
||||||
dynamo = boto3.resource('dynamodb', region_name=AWS_REGION)
|
dynamo = boto3.resource('dynamodb', region_name=AWS_REGION)
|
||||||
msg_table = dynamo.Table('ses-outbound-messages')
|
msg_table = dynamo.Table('ses-outbound-messages')
|
||||||
|
except Exception as e:
|
||||||
|
log(f"Warning: Could not connect to DynamoDB: {e}", 'WARNING')
|
||||||
|
msg_table = None
|
||||||
|
|
||||||
def get_bucket_name(domain):
|
def get_bucket_name(domain):
|
||||||
"""Konvention: domain.tld -> domain-tld-emails"""
|
"""Konvention: domain.tld -> domain-tld-emails"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue