mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Merge pull request #2638 from alphagov/remove-loadtesting
remove loadtesting from providers
This commit is contained in:
@@ -20,7 +20,6 @@ from app.clients import Clients
|
||||
from app.clients.document_download import DocumentDownloadClient
|
||||
from app.clients.email.aws_ses import AwsSesClient
|
||||
from app.clients.sms.firetext import FiretextClient
|
||||
from app.clients.sms.loadtesting import LoadtestingClient
|
||||
from app.clients.sms.mmg import MMGClient
|
||||
from app.clients.performance_platform.performance_platform_client import PerformancePlatformClient
|
||||
from app.encryption import Encryption
|
||||
@@ -46,7 +45,6 @@ migrate = Migrate()
|
||||
ma = Marshmallow()
|
||||
notify_celery = NotifyCelery()
|
||||
firetext_client = FiretextClient()
|
||||
loadtest_client = LoadtestingClient()
|
||||
mmg_client = MMGClient()
|
||||
aws_ses_client = AwsSesClient()
|
||||
encryption = Encryption()
|
||||
@@ -79,7 +77,6 @@ def create_app(application):
|
||||
statsd_client.init_app(application)
|
||||
logging.init_app(application, statsd_client)
|
||||
firetext_client.init_app(application, statsd_client=statsd_client)
|
||||
loadtest_client.init_app(application, statsd_client=statsd_client)
|
||||
mmg_client.init_app(application, statsd_client=statsd_client)
|
||||
aws_ses_client.init_app(application.config['AWS_REGION'], statsd_client=statsd_client)
|
||||
notify_celery.init_app(application)
|
||||
@@ -87,7 +84,7 @@ def create_app(application):
|
||||
redis_store.init_app(application)
|
||||
performance_platform_client.init_app(application)
|
||||
document_download_client.init_app(application)
|
||||
clients.init_app(sms_clients=[firetext_client, mmg_client, loadtest_client], email_clients=[aws_ses_client])
|
||||
clients.init_app(sms_clients=[firetext_client, mmg_client], email_clients=[aws_ses_client])
|
||||
|
||||
register_blueprint(application)
|
||||
register_v2_blueprints(application)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import logging
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from app.clients.sms.firetext import (
|
||||
FiretextClient
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class LoadtestingClient(FiretextClient):
|
||||
'''
|
||||
Loadtest sms client.
|
||||
'''
|
||||
|
||||
def init_app(self, config, statsd_client, *args, **kwargs):
|
||||
super(FiretextClient, self).__init__(*args, **kwargs)
|
||||
self.current_app = current_app
|
||||
self.api_key = config.config.get('LOADTESTING_API_KEY')
|
||||
self.from_number = config.config.get('FROM_NUMBER')
|
||||
self.name = 'loadtesting'
|
||||
self.url = "https://www.firetext.co.uk/api/sendsms/json"
|
||||
self.statsd_client = statsd_client
|
||||
@@ -78,9 +78,6 @@ class Config(object):
|
||||
# Firetext API Key
|
||||
FIRETEXT_API_KEY = os.getenv("FIRETEXT_API_KEY")
|
||||
|
||||
# Firetext simluation key
|
||||
LOADTESTING_API_KEY = os.getenv("LOADTESTING_API_KEY")
|
||||
|
||||
# Hosted graphite statsd prefix
|
||||
STATSD_PREFIX = os.getenv('STATSD_PREFIX')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user