Rebecca Law
c8bc29914f
Add queue for email-already-registered tasks.
2016-07-12 13:17:57 +01:00
Rebecca Law
36ecdca04c
Add new email template for the GOV.UK Notify service, to send an email to users that register with the same email address.
...
Add a new endpoint to send the email.
2016-07-07 17:23:07 +01:00
Rebecca Law
2da6226ace
Add scheduled_tasks to celery_import config
2016-06-20 13:44:24 +01:00
Martyn Inglis
838bf1d7d4
Merge branch 'master' into split-sms-and-retry
...
Conflicts:
app/celery/tasks.py
tests/app/celery/test_tasks.py
2016-06-17 16:39:03 +01:00
Martyn Inglis
51c6d57a86
Changed the delay period. Now waits
...
10 seconds, 1 minute, 5 minutes, 1 hour and 4 hours.
Total elapsed wait is max 5 hours 6 minutes and 10 seconds.
Changed visibility window of SQS to be 4 hours 10 seconds, longer the max retry period.
2016-06-17 16:32:56 +01:00
Martyn Inglis
bec882ba41
Merge branch 'master' into split-sms-and-retry
2016-06-13 11:39:13 +01:00
Nicholas Staples
dd9a7f09c5
Twilio config variables removed.
2016-06-13 08:39:33 +01:00
NIcholas Staples
964fd5ac35
Merge pull request #377 from alphagov/single_from_number
...
Replaced mmg from number and firetext from number with single from nu…
2016-06-09 10:41:39 +01:00
Nicholas Staples
8a1f4de217
Task added to update 'sending' notifications after 72 hours, set task to temporary-failure.
2016-06-08 15:25:57 +01:00
Martyn Inglis
642aa2890e
Starting to implement tests across the new tasks file
2016-06-07 11:09:54 +01:00
Nicholas Staples
fe7d894420
Replaced mmg from number and firetext from number with single from number.
...
Fix merge mistake.
Fix tests from merge.
Update config to include correct staging and live names.
2016-06-06 16:41:33 +01:00
Rebecca Law
4910483f39
Add a service that will be used to send Notify's messages.
...
Including sms code, email verification, invitation emails, and password reset emails
Added the service id and template ids to config.
Small change to dao_create_service to use id if set.
2016-06-02 15:34:43 +01:00
Martyn Inglis
290f416485
Various tidy ups and changes
...
- use new queue
- remove some new lines in AWS response data
- migration script to populate new fields
2016-06-01 16:57:57 +01:00
Martyn Inglis
909fac3c05
Added research mode tasks
...
- if a service is in research mode the don't send the notifications via the providers (MMG/SES/etc)
- instead set up a task to mimic those services callbacks - this completes the loop, and show stats, delivery receipts and so on.
- Use the "to" field to choose the response, allows users to create successful and errored notifications
temp fail sms, uses "07833333333"
perm fail sms, uses = "07822222222"
success = "07811111111" (or anything else)
success email = "delivered@simulator.notify "
perm fail = "perm-fail@simulator.notify "
temp fail = "temp-fail@simulator.notify "
2016-05-31 16:55:26 +01:00
Martyn Inglis
503ae80ece
Dev config does not send statsd
2016-05-16 12:05:26 +01:00
Martyn Inglis
829d862739
Fixed pep8 issues and hostname in the test environment.
2016-05-13 17:20:29 +01:00
Martyn Inglis
3f7559b286
Added statsd integration into the API
...
- new client for statsd, follows conventions used elsewhere for configuration
- client wraps underlying library so we can use a config property to send/not send statsd
Added statsd metrics for:
- count of API successful calls SMS/Email
- count of successful task execution for SMS/Email
- count of errors from Client libraries
- timing of API calls to third party clients
- timing of how long messages live on the SQS queue
2016-05-13 17:15:39 +01:00
Martyn Inglis
06bfe81329
Load testing client added
2016-05-12 10:46:35 +01:00
Martyn Inglis
571686b638
Ensure that the primary provider is used in all tasks
2016-05-10 09:04:22 +01:00
Adam Shimali
b51ee0b4d0
Add delivery status endpoint
2016-04-29 13:00:21 +01:00
Nicholas Staples
f71dbe9c0f
Message limit added and all tests passing.
2016-04-29 10:36:59 +01:00
Adam Shimali
4e81695c84
Added limit_days filter to get notifications dao.
2016-04-28 16:51:19 +01:00
Adam Shimali
24ea6f1637
Use short dates when selection notifications for deletion.
...
This means we will retain notifications for a full week and not
delete records that are 7 x 24 hours older than the time of the run of
the deletion task.
Also the task only needs to run once a day now, so I have changed
the celery config for the deletion tasks.
2016-04-25 16:12:46 +01:00
Rebecca Law
203d9f1e42
Fix mmg_api_key config
2016-04-08 11:04:24 +01:00
Rebecca Law
39f7aa0820
Fix bucket name for all environments
2016-04-08 10:28:25 +01:00
Nicholas Staples
143d1b0db8
Updated to retrieve csv upload from new bucket.
...
Fix test errors.
2016-04-07 14:10:30 +01:00
Rebecca Law
c132bbf46e
Rename NOTIFY_FROM_NUMBER to MMG_FROM_NUMBER, there should be a separate short code per provider.
2016-04-07 10:18:46 +01:00
Rebecca Law
e8d5a9292a
Merge branch 'master' into integrate_MMG
...
Conflicts:
app/notifications/rest.py
2016-04-06 14:58:13 +01:00
Nicholas Staples
4cc0028b01
Remove csv after process job is finished.
...
Fixed new tests.
2016-04-05 14:55:03 +01:00
Rebecca Law
2ba12da77d
WIP: adding delivery receipt endpoint for mmg
2016-04-04 15:02:21 +01:00
Rebecca Law
69697388d7
Initial set up for mmg client integration
2016-04-01 16:42:31 +01:00
Rebecca Law
df6f784f9e
- Remove different behaviour for debug mode in errors.py
2016-04-01 14:19:50 +01:00
Rebecca Law
8493e29acc
Added some more tests.
...
Removed the validation in the schema - it was adding complexity, let the unique constraint on the db throw the exception. This should only ever happen on a race condition which seems unlikely (two people changing a service to the same name at the same time)
Do no set debug=true to the test config. If debug=true it changes the behaviour of the error handlers, throwing the exception rather than returning a 500.
2016-04-01 13:42:11 +01:00
Nicholas Staples
090babaaeb
Added endpoint for removing user from service, all tests passing.
2016-03-22 13:14:23 +00:00
Adam Shimali
2d1d883283
Added task for sending email verification links out on intial
...
registration.
Left original email code endpoint in as it is still used for things like
email change.
2016-03-17 15:21:04 +00:00
Martyn Inglis
9a7788a6f5
Allowing overrides on a per environment basis
2016-03-17 11:47:44 +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
fbfa176895
First schedule
2016-03-09 14:41:36 +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
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
Rebecca Law
5c4ac9d938
Include token creation date in the url token.
2016-03-07 18:20:20 +00:00
Rebecca Law
b15d3434c3
Added an endpoint and celery task to email a reset password url.
2016-03-07 14:34:53 +00:00
Rebecca Law
0169ebe69a
Add routing keys to celery queues.
...
NOTE: make sure upstart script on preview is updated before merging.
2016-03-02 16:22:22 +00:00
Rebecca Law
fde062ec7d
Reduce polling_interval back to 1 second
2016-03-02 14:04:03 +00:00
Rebecca Law
6a739d5ec9
Remove celery_queues from config.
...
Removed unused endpoint.
2016-03-02 13:15:23 +00:00
Martyn Inglis
3872ac5e67
Moved the deinition of which queues the worker will consume from
...
- now in config not the script
2016-03-01 16:57:06 +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
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
Rebecca Law
3879350c12
Send email invitation to invited user
2016-02-29 15:56:00 +00:00