Martyn Inglis
58c78f864b
Changed path to decode error for 3.4.x compatibility
2016-03-11 09:00:02 +00:00
Martyn Inglis
2d3364d946
Fixing import path to JSON decode exception
2016-03-11 08:37:04 +00:00
Martyn Inglis
f88f86a924
Endpoint to allow SES updates to occur
...
- update notification with delivery state
2016-03-10 17:29:17 +00:00
Martyn Inglis
2922712f0b
Make sms code task use a reference too
...
- makes the fire text callback behave in consistent way
2016-03-10 15:51:11 +00:00
Martyn Inglis
1f22f2b7cc
Updates to fire text integration:
...
- client updated to raise errors with fire text error codes/messages
New endpoint
- /notifications/sms/firetext
For delivery notifications to be sent to.
2016-03-10 15:40:41 +00:00
Martyn Inglis
c580b9c084
Pass notification ID to fire text as our reference
...
- also handle fire text errors, non-zero response code means error.
2016-03-10 13:22:45 +00:00
minglis
209244ff19
Merge pull request #144 from alphagov/delete-expired-things
...
Delete expired things
2016-03-10 12:45:31 +00:00
NIcholas Staples
c29769724a
Merge pull request #145 from alphagov/duplicate_service_name_bug
...
Duplicate service name check added and all tests passing.
2016-03-10 10:40:31 +00:00
Nicholas Staples
b409e4459d
Duplicate service name check added and all tests passing.
2016-03-10 10:34:46 +00:00
Martyn Inglis
685c66b3d3
Print statement
2016-03-10 09:57:44 +00:00
Martyn Inglis
fd7eb54d10
Merge branch 'master' into delete-expired-things
...
Conflicts:
app/celery/tasks.py
tests/app/celery/test_tasks.py
tests/app/dao/test_notification_dao.py
2016-03-10 09:48:29 +00:00
Martyn Inglis
976a4c06e3
Renamed some files and fixed a bug on deleting the failed notifications
2016-03-10 09:34:27 +00:00
Martyn Inglis
c8a5366484
Scheduled tasks to clean up the database
...
- tasks run hourly
- uses celery beat to schedule the tasks
4 new tasks
- delete verify codes (after 1 day)
- delete invitations (after 1 day)
- delete successful notifications (after 1 day)
- delete failed notifications (after 7 days)
Delete methods in the DAO classes
2016-03-09 17:46:01 +00:00
minglis
ff97d0b064
Merge pull request #143 from alphagov/rate-limit
...
Rate limit
2016-03-09 15:08:49 +00:00
Martyn Inglis
593d753ed5
Updated tests
2016-03-09 14:52:07 +00:00
Martyn Inglis
45b19a49a4
Updated tests
2016-03-09 14:49:14 +00:00
Martyn Inglis
fbfa176895
First schedule
2016-03-09 14:41:36 +00:00
Martyn Inglis
2a13fe4a54
Merge branch 'master' into rate-limit
...
Conflicts:
app/celery/tasks.py
tests/app/celery/test_tasks.py
2016-03-09 14:16:59 +00:00
Martyn Inglis
4a880af8ef
Drop all services sending limits to 50.
2016-03-09 14:03:44 +00:00
Martyn Inglis
b0074449bd
Adds another job state to account for when sending limits have been exceeded.
2016-03-09 13:57:53 +00:00
Martyn Inglis
61af70a392
Some more tests around edge cases
2016-03-09 11:35:12 +00:00
Martyn Inglis
14d621d243
Job processing respects sendlimits
...
- If a job starts it MUST be able to fit into the days sending limits
- So if service limit is 10, and we've sent 5 messages and the current job is 4 then it's OK.
- If the job is 6 then it's over the limit and it should fail
- Job should NOT start if can't complete in the limit
2016-03-09 11:28:52 +00:00
Chris Hill-Scott
03f5f01a51
Merge pull request #142 from alphagov/allow-csvs-with-extra-personalisation
...
Accept CSV files with additional columns
2016-03-09 11:13:18 +00:00
Martyn Inglis
61a0cf32c8
Ensure clients have rate limit enforced
...
- rate limiting is a hard number per day
- not limited in terms of rate of request
- limit is a single number held against the service
- every notification counts against the limit, regardless of type
- return a 429 if limit exceeded.
2016-03-09 11:06:37 +00:00
Rebecca Law
63fa6ddbbb
Merge pull request #139 from alphagov/reset-password
...
Reset password
2016-03-09 10:42:38 +00:00
Rebecca Law
d0c5977b9d
Fix extra space in test
2016-03-09 09:57:14 +00:00
Chris Hill-Scott
589b4de5f9
Accept CSV files with additional columns
...
Currently when the Celery task processes a CSV it will call the API with the
values for all the non-recipient columns in the `personalisation` field. This
means that those API calls would fail, even though the CSV has been processed
‘successfully’.
This was not being caught by the tests, so this commit adds extra tests to check
what data the task is passing to the API call.
It then updates utils to version 2.0.1 which brings in this fix:
https://github.com/alphagov/notifications-utils/pull/10
2016-03-09 09:52:39 +00:00
Rebecca Law
49198b26e7
Merge branch 'master' into reset-password
...
Conflicts:
app/schemas.py
tests/app/celery/test_tasks.py
2016-03-09 09:36:57 +00:00
NIcholas Staples
528f570ab6
Merge pull request #141 from alphagov/capture-aggregate-data
...
Capture aggregate data
2016-03-08 17:54:39 +00:00
Rebecca Law
114cfa6b17
Use the validation error message from the InvalidEmailError
2016-03-08 17:46:00 +00:00
Martyn Inglis
e07d16e8c6
Fixed up dates so that we respect mills
2016-03-08 17:45:37 +00:00
Chris Hill-Scott
6308a5b2ca
Merge pull request #140 from alphagov/remove_delivery_config
...
Removed DELIVERY_CLIENT_USER_NAME and DELIVERY_CLIENT_SECRET
2016-03-08 17:10:44 +00:00
Martyn Inglis
67c4bd2263
Build rest endpoint to read service stats
...
- get stats by service id
- returns a list of stats objects
Not paginated - have 1 row per day.
2016-03-08 16:34:03 +00:00
Rebecca Law
29a7289d1e
Use new email validation.
...
Use logger.exception where it makes sense, not for SqlAlchemy errors as it give too much information away.
2016-03-08 15:47:35 +00:00
Rebecca Law
cbc585a1b1
Merge branch 'master' into reset-password
2016-03-08 15:40:20 +00:00
Rebecca Law
fde4b646f6
Merge pull request #134 from alphagov/use-updated-csv-util
...
Use utils to validate and iterate over recipients
2016-03-08 15:39:37 +00:00
Rebecca Law
5d7b1bc786
Removed DELIVERY_CLIENT_USER_NAME and DELIVERY_CLIENT_SECRET from configs and auth module
2016-03-08 15:27:12 +00:00
Martyn Inglis
f5f50e00ff
New notification stats table
...
- to capture the counts of things that we do
- initial commit captures when we create an email or sms
DOES NOT know about ultimate success only that we asked our partners to ship the notification
Requires some updates when we retry sending in event of error.
2016-03-08 15:23:19 +00:00
Rebecca Law
6e17a015e8
Add missing import
2016-03-08 15:20:34 +00:00
Rebecca Law
d840b8d689
Merge branch 'master' into reset-password
2016-03-08 15:05:18 +00:00
Rebecca Law
ba337374fd
- Remove password_changed_at from the update_dict in users_dao
...
- Format dates in UserSchema
- Properly formatted subject and message body for the password reset email
- Add name to the message for reset password
2016-03-08 14:33:06 +00:00
Chris Hill-Scott
8323757441
Accept phone numbers in any valid format
...
This uses the `format_phone_number` method from utils to output phone numbers
in a consistent format. It is added to the schemas, so will be applied before
the API tries to do anything with a provided phone number.
So now the API will accept any of the following:
- 07123456789
- 07123 456789
- 07123-456-789
- 00447123456789
- 00 44 7123456789
- +447123456789
- +44 7123 456 789
- +44 (0)7123 456 789
…but the API will always hand off phone numbers to 3rd party APIs in the format
- +447123456789
The test for this is slightly convoluted, because template IDs are still
database IDs, and can’t consistently be mocked, therefore we have to ignore that
part of the call to `encrypt()`.
2016-03-08 09:47:21 +00:00
Chris Hill-Scott
157b385327
Use validation of recipients from utils
...
This was added to utils in https://github.com/alphagov/notifications-utils/commit/5914da74f1f948e2fbcd7597b7a26476de1e2eb3
This means that:
- we are doing the exact same validation in the API and admin app
- we are actually validating phone numbers for the correct format (hence all the
changes to the tests)
2016-03-08 09:47:21 +00:00
Chris Hill-Scott
7cb8450839
Use RecipientCSV from utils for processing CSVs
...
See https://github.com/alphagov/notifications-utils/pull/9 for details of the
changes.
2016-03-08 09:43:48 +00:00
NIcholas Staples
e99331315e
Merge pull request #138 from alphagov/fix-not-null-notifications-sent
...
Add script to set notifications sent count on jobs table.
2016-03-08 09:17:05 +00:00
Martyn Inglis
8d8abb524d
Add script to set notifications sent count on jobs table.
2016-03-08 09:12:33 +00:00
NIcholas Staples
f931e3fca6
Merge pull request #133 from alphagov/aggregate-data
...
Aggregate data
2016-03-08 08:55:04 +00:00
NIcholas Staples
bcca510a2d
Merge pull request #137 from alphagov/fix-logged-in-at
...
Capture logged in at when password is verified
2016-03-08 08:49:44 +00:00
Rebecca Law
5c4ac9d938
Include token creation date in the url token.
2016-03-07 18:20:20 +00:00
Rebecca Law
10296f0cc2
Send email address in the data rather than the user_id as a path param.
...
Remove unused OldRequestVerifyCodeSchema.
2016-03-07 15:21:05 +00:00