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
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
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
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
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
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
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
Martyn Inglis
ae395b490e
Fixed bug where I forgot to update only the right job :-(
2016-03-04 15:54:43 +00:00
Martyn Inglis
c44aaf0fdc
Capture the count of sent notifications for a job
2016-03-04 14:25:28 +00:00
Nicholas Staples
ebec54cb80
Permission enums corrected, all tests passing.
2016-03-02 15:34:26 +00:00
Nicholas Staples
01f616eeac
Fix all tests.
2016-03-02 11:10:52 +00:00
Nicholas Staples
6f689a187e
Merge remote-tracking branch 'origin/master' into update_permission_endpoints
2016-03-02 10:44:38 +00:00
Nicholas Staples
47c4368007
Merge with master.
2016-03-01 17:18:46 +00:00
Rebecca Law
a2b1dc0432
Merge pull request #115 from alphagov/accept-invite
...
[WIP] Start of api for accepting invite.
2016-03-01 15:57:52 +00:00
Rebecca Law
dd503e7f14
Merge pull request #113 from alphagov/fetch-notifications-endpoints
...
Fetch endpoints for notifications
2016-03-01 15:16:54 +00:00
Martyn Inglis
dd67b84f6d
Merge branch 'fetch-notifications-endpoints' of github.com:alphagov/notifications-api into fetch-notifications-endpoints
...
Conflicts:
app/dao/notifications_dao.py
2016-03-01 14:59:21 +00:00
Martyn Inglis
6d345c1dfc
Fixed ordering of the notifications test
...
- was backwards
2016-03-01 14:58:27 +00:00
minglis
57d8aa2bfd
Removed print statement
2016-03-01 14:38:54 +00:00
Nicholas Staples
918d40cc9d
Functionality added and all tests working.
2016-03-01 14:21:28 +00:00
Adam Shimali
3b66745677
[WIP] Start of api for accepting invite.
2016-03-01 14:13:38 +00:00
Martyn Inglis
c5a993ead1
Fetch endpoints for notifications
...
- includes check on token type to ensure clients can perform admin style fetches
2016-03-01 13:30:10 +00:00
Nicholas Staples
7d43b4265f
Merge and fix conflicts.
2016-03-01 11:59:50 +00:00
Rebecca Law
ecbfbbc6b0
Fix bug in PermissionDAO
...
Refactor user/test_rest
Remove conftest/sample_admin_service
2016-03-01 10:34:27 +00:00
Nicholas Staples
47ac0b8a98
Fixed some tests.
2016-02-29 18:32:25 +00:00
Nicholas Staples
8ad13b6356
Manage template permission added. All tests passing.
2016-02-29 15:21:35 +00:00
Nicholas Staples
2cf2b51cd9
Fix for git commit review.
2016-02-29 11:50:43 +00:00
Nicholas Staples
9b73b0d9f8
Default permissions added on service creation. All tests working.
2016-02-26 17:11:30 +00:00
Nicholas Staples
16e1ecb134
Working permissions and all tests passing.
...
Remove print statements.
Fix for review comments.
2016-02-26 15:00:29 +00:00
Martyn Inglis
b213c3fa3c
Merge branch 'master' into celery-jobs
...
Conflicts:
tests/app/conftest.py
2016-02-25 15:10:39 +00:00
Adam Shimali
99c9cd608c
[WIP] changed dao query to use .first and return specific not found
...
error message from rest view method.
2016-02-25 12:13:25 +00:00
Martyn Inglis
a3a9d673a6
Merge branch 'master' into celery-jobs
2016-02-25 12:06:53 +00:00
Adam Shimali
883ad02c25
[WIP] added dao and rest endpoint for retrieving invited users
...
by service and by id.
2016-02-25 11:22:36 +00:00
Martyn Inglis
10a764a2c1
Renamed the header of the CSV to 'to' from 'number' to allow for email jobs
...
- added new columns to Job and Notification to capture the start/end dates accurately
2016-02-25 09:59:50 +00:00
Martyn Inglis
b3884e2d6c
Move job processing into celery
...
- brings boto S3 into new AWS folder
- CSV processing utils method
Rejigs the jobs rest endpoint - removes some now unused endpoints,
Calls to the task with the job, job processing in task, delegating SMS calls to the sms task
2016-02-24 17:12:30 +00:00
Adam Shimali
e6fe10cbdc
[WIP] added endpoint and dao to create invites for users.
...
Droped token as later code to send email invite can generate
timebased url to send to user. That can then be checked
against configurable time threshold for expiry. Therefore
no need to store a token.
2016-02-24 14:18:56 +00:00
Martyn Inglis
1667f82df1
Removed some unused template dao methods
2016-02-24 11:51:02 +00:00
Martyn Inglis
635debb5a6
Moved the sending sms for a job into celery tasks
2016-02-23 17:30:50 +00:00
Adam Shimali
21e791b25c
Add endpoint for getting user by email address
2016-02-23 11:03:59 +00:00
Martyn Inglis
443691402f
Slight tiny up of templates_dao
...
- 1 method per get query
- logic around create/update removed
2016-02-22 09:46:16 +00:00
Martyn Inglis
dc294c32ae
Fix all other dependant classes that are affected by the DAO / Service / Model changes
2016-02-19 15:54:11 +00:00
Martyn Inglis
5bfae689c2
Refactored the services dao to be a little cleaner
...
- some things we don't need
- bulk update of users
- delete service
Now returns None if can't find an object
2016-02-19 15:53:15 +00:00
Martyn Inglis
655beddba6
Fixed up the get_notitication endpoint
...
- returns a notification
2016-02-16 11:22:44 +00:00
Adam Shimali
17e5e70f6c
[WIP] Added endpoints under /job for creating, updating and reading
...
notification status.
2016-02-09 14:17:42 +00:00
Adam Shimali
e5e049d735
Added service and template relationship to notification model.
...
This makes it more consistent with other model classes with respect
to marhmallow serialisation/deserialisation.
2016-02-09 12:48:27 +00:00
Adam Shimali
c7121be5a2
[WIP] New model class and dao for notification. This will be used for
...
recording status and outcome of sending notifications.
2016-02-09 12:03:40 +00:00
Adam Shimali
e024db6858
As job update is a PUT then all non nullable fields
...
need to be sent with update.
Also bug in not committing update fixed.
2016-02-05 13:07:02 +00:00
Adam Shimali
bec4bbe04e
Endpoint and dao method for updating job status.
2016-02-04 20:55:09 +00:00