Commit Graph

1885 Commits

Author SHA1 Message Date
Jenny Duckett
33e74a6b07 Merge pull request #765 from alphagov/use-notify-queue-to-deliver
Send Notify's 2FA codes via only one queue
2016-12-12 15:16:59 +00:00
Rebecca Law
4ba580e77c Merge pull request #761 from alphagov/invite-expiry-msg
Invite expiry message
2016-12-12 15:06:26 +00:00
Jenny Duckett
7332874415 Use namedtuple in test_send_notification_to_queue
This makes this test a couple of seconds faster - 0.7s instead of 2.5s for me
locally. sample_notification also creates a service, template, user and
permissions, but we don't need any of these objects to exist in the database
for this test. It's particularly helpful for this test because there are so
many parameterized cases. Thanks @leohemsted for suggesting doing this here.
2016-12-09 17:37:18 +00:00
Jenny Duckett
e569c54f45 Send Notify's 2FA codes via only the notify queue
This means that these codes won't be delayed by large jobs going through the
send-sms/email queues. send_user_sms_code now works much more like the
endpoints for sending notifications, by persisting the notification and only
using the deliver_sms task (instead of using send_sms as well).

The workers consuming the `notify` queue should be able to handle the deliver
task as well, so no change should be needed to the celery workers to support
this.

I think there's also a change in behaviour here: previously, if the Notify
service was in research mode, 2FA codes would not have been sent out, making
it impossible to log into the admin. Now, a call to this endpoint will always
send out the notification even if we've put the Notify service into research
mode, since we set the notification's key type to normal and ignore the
service's research mode setting when sending the notification to the queue.
2016-12-09 16:46:49 +00:00
Jenny Duckett
d5d079a150 Add optional queue param to send_notification_to_queue
We want to use this function for sending internal notifications to a different
queue.
2016-12-09 16:46:49 +00:00
Rebecca Law
8c9e7b2d68 Update the tests for the new text 2016-12-09 12:28:28 +00:00
Pete Herlihy
e97c3bcc73 Tweaked the wording of the expired invitation message. 2016-12-09 12:20:03 +00:00
Rebecca Law
eedc2fb43e Fix test and style 2016-12-07 13:29:19 +00:00
Rebecca Law
f946b022e8 Update the invitation expiry error message so that it is nicer to read. 2016-12-07 13:05:38 +00:00
minglis
32a21bfd3a Merge pull request #760 from alphagov/bumped-version-of-utils
Latest version of utils included
2016-12-07 09:15:15 +00:00
Martyn Inglis
869cf48eff Latest version 2016-12-06 16:51:46 +00:00
Jenny Duckett
f02869c1e6 Merge pull request #758 from alphagov/stats-toggle-test-key
Add include_from_test_key parameter to /service
2016-12-06 10:58:10 +00:00
minglis
f452bf46f0 Merge pull request #759 from alphagov/bumped-version
Bumped version
2016-12-06 09:57:50 +00:00
Chris Hill-Scott
1e4274655a Bump utils version to really bring in latest changes 2016-12-06 09:45:39 +00:00
minglis
aa2ac5e822 Merge pull request #756 from alphagov/use-redis-and-statsd-from-utils
Use redis and statsd from utils
2016-12-06 09:00:35 +00:00
Jenny Duckett
d2649aebc8 Add include_from_test_key parameter to /service
We want to be able to toggle the numbers on the platform admin page between
including and excluding notifications sent using test keys, so that we can see
both real use of the platform and all load on it.

This parameter defaults to True, which is the existing behaviour.
2016-12-05 17:50:52 +00:00
Jenny Duckett
7668745d8b Allow excluding test key use in the all services stats query 2016-12-05 17:35:19 +00:00
Jenny Duckett
ad7278fd4e Add tests for dao_fetch_todays_stats_for_all_services 2016-12-05 17:35:06 +00:00
bandesz
eda06228d6 Enable SSE for S3 upload 2016-12-05 16:58:20 +00:00
Martyn Inglis
3342ca2993 Bumped version 2016-12-02 16:56:23 +00:00
Martyn Inglis
085b40d367 Merge branch 'master' into use-redis-and-statsd-from-utils 2016-12-02 15:49:09 +00:00
Andras Ferencz-Szabo
2a2488e48c Merge pull request #757 from alphagov/docker_build_http_proxy
Set http proxy params for Docker build
2016-12-02 15:16:36 +00:00
bandesz
a67195a86d Set http proxy params for Docker build 2016-12-02 14:45:33 +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
minglis
22f6161440 Merge pull request #752 from alphagov/update-readme
Update README
2016-12-02 10:14:00 +00:00
minglis
d76e7e72b1 Merge pull request #748 from alphagov/switch-redis-on
Set up REDIS config.
2016-12-02 10:13:43 +00:00
Martyn Inglis
cea48140f8 Added README to tell users how tp switch REDIS on 2016-12-02 10:11:31 +00:00
Martyn Inglis
687f217d7b Updated readme 2016-12-02 10:09:36 +00:00
Martyn Inglis
9fb378021c Bumped version to use latest utils
- note this is not yet published so will break.....
- sorts out an issue with service id logging
2016-12-01 17:24:23 +00:00
Martyn Inglis
7260561ad5 Makes the app use the redis and statsd clients from utils 2016-12-01 17:20:05 +00:00
Martyn Inglis
9667d42008 Minor bump of utils 2016-12-01 12:47:33 +00:00
minglis
d2ce6f2808 Merge pull request #755 from alphagov/request-id-logging
Request id logging
2016-12-01 11:53:32 +00:00
minglis
0ddd8d93ae Merge pull request #753 from alphagov/logging-service-ids
Records the service ID if present in the request
2016-12-01 11:38:49 +00:00
Martyn Inglis
5ae21bf1d5 Bumped requirements version 2016-12-01 11:34:38 +00:00
Jenny Duckett
84f89fb768 Update README
- the bootstrap script needs to be run before the app will run, so mention
  that first
- explain what run_celery_beat.sh is for and that it isn't required to run the
  app
2016-11-30 17:49:47 +00:00
Martyn Inglis
d8625f9da4 Fixed tests that failed due to changes in utils brought in by latest version.
- seems phonenumber/emailaddress from the CSV are now passed in as personalisation.
- assume the renderer does the correct thing here. Will need to check with @quis
2016-11-30 17:22:03 +00:00
Martyn Inglis
7fe56cf992 Add request ID logging to the API.
- adds a request ID if needed to use in all log events
- respects request-ids passed in from calling clients
2016-11-30 17:05:39 +00:00
Andras Ferencz-Szabo
2e0ab3eba1 Merge pull request #754 from alphagov/use_http_proxy_for_docker
Use http proxy for Docker
2016-11-30 16:55:13 +00:00
bandesz
07aa4cb0b0 Use http proxy for Docker 2016-11-30 15:57:08 +00:00
minglis
40cf6c049f Merge pull request #746 from alphagov/record-user-agent
Statsd counter for user agents.
2016-11-30 12:51:30 +00:00
Rebecca Law
6b079dc2bf Merge pull request #747 from alphagov/dont-send-message-twice
Protect send_sms send_email task from being executed twice
2016-11-30 11:12:41 +00:00
Martyn Inglis
23ca62a7ac Records the service ID if present, or if an ADMIN api call the string admin-api.
this is used later in logging of requests.
2016-11-30 10:59:55 +00:00
Rebecca Law
28fe1fe049 Merge branch 'master' into dont-send-message-twice
Conflicts:
	tests/app/notifications/test_validators.py
2016-11-29 16:13:43 +00:00
Rebecca Law
6ffd97648c Merge pull request #751 from alphagov/fix-mocks
Refactored a couple of tests that were slightly testing the wrong thing.
2016-11-29 16:04:55 +00:00
Rebecca Law
e38625632c Remove print 2016-11-29 16:03:58 +00:00
Martyn Inglis
c437615661 Merge branch 'master' into fix-mocks
Conflicts:
	tests/app/notifications/test_validators.py
2016-11-29 13:32:40 +00:00
Martyn Inglis
2182b5715e Refactored a couple of tests that were slightly testing the wrong thing.
- Ensure mock used correctly.
2016-11-29 13:27:57 +00:00
Rebecca Law
e8f045b352 Merge branch 'master' into dont-send-message-twice
Conflicts:
	tests/app/notifications/test_validators.py
2016-11-29 12:34:33 +00:00
Rebecca Law
94609cef79 Fix how the exception is logged. 2016-11-28 17:22:03 +00:00
Paul Craig
2ae8967a5f Merge pull request #749 from alphagov/pc-nab-numerous-notifications
Remove marshmallow schema validation + format error messages
2016-11-28 17:20:27 +00:00