Add a document download client

Allows uploading documents to the Document Download API.
The client is configured with an API host and auth token. There's
no need for a flag to disable the client in the test environments
at the moment since the upload is only triggered by a specific
payload which would only be sent with an explicit goal of using
document download.
This commit is contained in:
Alexey Bezhan
2018-04-04 17:31:02 +01:00
parent a0c6f6a22e
commit 204aaf172d
4 changed files with 70 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ from werkzeug.local import LocalProxy
from app.celery.celery import NotifyCelery
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
@@ -39,6 +40,7 @@ deskpro_client = DeskproClient()
statsd_client = StatsdClient()
redis_store = RedisClient()
performance_platform_client = PerformancePlatformClient()
document_download_client = DocumentDownloadClient()
clients = Clients()
@@ -71,6 +73,7 @@ def create_app(application):
encryption.init_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])
register_blueprint(application)