mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
fix batch processing
This commit is contained in:
@@ -244,4 +244,7 @@ def process_delivery_receipts():
|
|||||||
start_time = utc_now() - timedelta(minutes=10)
|
start_time = utc_now() - timedelta(minutes=10)
|
||||||
end_time = utc_now()
|
end_time = utc_now()
|
||||||
receipts = cloudwatch.check_delivery_receipts(start_time, end_time)
|
receipts = cloudwatch.check_delivery_receipts(start_time, end_time)
|
||||||
dao_update_delivery_receipts(receipts)
|
batch_size = 100
|
||||||
|
for i in range(0, len(receipts), batch_size):
|
||||||
|
batch = receipts[i : i + batch_size]
|
||||||
|
dao_update_delivery_receipts(batch)
|
||||||
|
|||||||
@@ -69,10 +69,6 @@ class AwsCloudwatchClient(Client):
|
|||||||
|
|
||||||
def check_delivery_receipts(self, start, end):
|
def check_delivery_receipts(self, start, end):
|
||||||
|
|
||||||
result = self._client.describe_log_groups()
|
|
||||||
print(result)
|
|
||||||
return
|
|
||||||
|
|
||||||
region = cloud_config.sns_region
|
region = cloud_config.sns_region
|
||||||
account_number = self._extract_account_number(cloud_config.ses_domain_arn)
|
account_number = self._extract_account_number(cloud_config.ses_domain_arn)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user