Commit Graph

11 Commits

Author SHA1 Message Date
Leo Hemsted
d4f23f1e44 don't use cloudfront on preview or staging
cloudfront caching isn't set up on those environments yet, so continue
to use flask for now - in the future we'll want to revert this once
those environments are up and running properly
2016-12-29 12:15:47 +00:00
Leo Hemsted
9e27574298 Merge pull request #779 from alphagov/switch-to-cloudfront
use cloudfront instead of flask to serve static images
2016-12-29 11:35:05 +00:00
Leo Hemsted
5cbe4eb5b2 use cloudfront instead of flask to serve static images
branding in emails was previously hosted from admin app - this changes
the url to be static.{domain}/images instead of {domain}/static/images,
which redirects to cloudfront.

some manipulation of the URL was required to make sure it still serves
locally rather than returning "static.localhost:6012" for example.

(if ADMIN_BASE_URL is localhost it just returns the old /static/
path)

also was able to remove DB interaction from a test. woo!
2016-12-21 16:35:16 +00:00
Martyn Inglis
2d946736e0 Log notification ID on deliver tasks and in clients.
- help tie things together  in Kibana.
2016-12-20 13:24:08 +00:00
Chris Hill-Scott
59af44d7ab Update utils to 12.0.0
Includes:

- [x] https://github.com/alphagov/notifications-utils/pull/94 (breaking
      changes which are responsible for all the changes to the API in
      this PR)

The test for `get_sms_fragment_count` has been removed because this
method is already tested in utils here:

ac20f7e99e/tests/test_base_template.py (L140-L159)
2016-12-13 10:57:01 +00:00
Chris Hill-Scott
d449475dd5 Incorporate breaking utils changes
The `.replaced…` methods on instances of `Template` were removed in
https://github.com/alphagov/notifications-utils/pull/84
2016-12-02 10:42:11 +00:00
Martyn Inglis
6f7dd149e2 Tidied up pull request comments 2016-09-23 15:59:23 +01:00
Martyn Inglis
137aa1e2d2 Merge branch 'master' into refactor-send-tasks-into-shared-code
Conflicts:
	app/celery/provider_tasks.py
	tests/app/celery/test_provider_tasks.py
2016-09-23 09:54:53 +01:00
Martyn Inglis
2f36e0dbcf Refactor to make the new send_to_provider methods take a notification not a notification ID.
- Driven by the fact we won't know the type in the API call
- hence we need to load notification earlier , so pass it not the id through to the send task to avoid loading it twice.
2016-09-22 09:16:58 +01:00
Martyn Inglis
991cc884b4 Refactoring the send to provider code out of the tasks folder
- building a rest endpoint to call that code to compliment the existing task based approach.
2016-09-21 13:27:32 +01:00
Martyn Inglis
bd06b18684 Refactor of celery tasks.
- Aim to move the code that contacts providers into it's own module.
- Celery tasks now call this module to send to provider
- No exceptions caught in the new module. Celery tasks now use any exception to trigger a retry.
- tests moved about - new test directory for the new class, all tests from celery test module moved, excepting the retry logic.
2016-09-20 17:24:28 +01:00