mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 09:42:38 -05:00
Try removing boto package again
This commit is contained in:
@@ -3,7 +3,7 @@ import functools
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from boto.exception import SQSError
|
||||
import botocore
|
||||
from flask import abort, current_app, jsonify, request
|
||||
from gds_metrics import Histogram
|
||||
from notifications_utils.recipients import try_validate_and_format_phone_number
|
||||
@@ -232,7 +232,7 @@ def process_sms_or_email_notification(
|
||||
reply_to_text=reply_to_text
|
||||
)
|
||||
return resp
|
||||
except SQSError:
|
||||
except botocore.exceptions.ClientError:
|
||||
# if SQS cannot put the task on the queue, it's probably because the notification body was too long and it
|
||||
# went over SQS's 256kb message limit. If so, we
|
||||
current_app.logger.info(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Run `make freeze-requirements` to update requirements.txt
|
||||
# with package version changes made in requirements-app.txt
|
||||
|
||||
boto==2.49.0 # notify-api crashes in PaaS without this
|
||||
cffi==1.14.5
|
||||
celery[sqs]==5.1.2
|
||||
docopt==0.6.2
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# Run `make freeze-requirements` to update requirements.txt
|
||||
# with package version changes made in requirements-app.txt
|
||||
|
||||
boto==2.49.0 # notify-api crashes in PaaS without this
|
||||
cffi==1.14.5
|
||||
celery[sqs]==5.1.2
|
||||
docopt==0.6.2
|
||||
|
||||
@@ -2,8 +2,8 @@ import uuid
|
||||
from unittest import mock
|
||||
from unittest.mock import call
|
||||
|
||||
import botocore
|
||||
import pytest
|
||||
from boto.exception import SQSError
|
||||
from flask import current_app, json
|
||||
|
||||
from app.dao import templates_dao
|
||||
@@ -1074,7 +1074,7 @@ def test_post_notifications_saves_email_or_sms_normally_if_saving_to_queue_fails
|
||||
):
|
||||
save_task = mocker.patch(
|
||||
f"app.celery.tasks.save_api_{notification_type}.apply_async",
|
||||
side_effect=SQSError({'some': 'json'}, 'some opname')
|
||||
side_effect=botocore.exceptions.ClientError({'some': 'json'}, 'some opname')
|
||||
)
|
||||
mock_send_task = mocker.patch(f'app.celery.provider_tasks.deliver_{notification_type}.apply_async')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user