Commit Graph

16 Commits

Author SHA1 Message Date
Ken Tsang
c14452d8b1 Add create fake letter response file
- used by letter functional tests to ensure that we can create the response file necessary to trigger the update to a delivered state
2018-01-26 14:45:36 +00:00
venusbb
489f43a2c9 rename callback_tasks.py to process_ses_receipts.py
create service_callback_tasks.py for tasks to send delivery statuses to services
2017-12-01 16:15:21 +00:00
Leo Hemsted
04e3218087 ensure sample SES callbacks and SNS subscription payloads are accurate in research mode and unit tests 2017-11-17 14:34:16 +00:00
Leo Hemsted
d2154451e5 update research mode email callbacks to add process-ses-response task to queue
this involved:
* moving that task to callback_tasks to prevent circular imports
* updating the dummy research mode callbacks (with actual SNS messages from the
  ses simulator emails)
* refactoring tests
2017-11-17 13:41:45 +00:00
Leo Hemsted
6c61a3fc2a Revert celery4
Revert the following three pull requests:
https://github.com/alphagov/notifications-api/pull/1085
https://github.com/alphagov/notifications-api/pull/1086
https://github.com/alphagov/notifications-api/pull/1088

celery 4.0.2 looked promising, however, on staging under mild load
(5/sec api calls) the performance was actually worse than 3.1.25
2017-07-19 15:17:19 +01:00
Martyn Inglis
786adb5d71 Move Queuenames in with the celery code, revamp config to allow move to celery 4.x 2017-07-12 12:01:52 +01:00
Martyn Inglis
bce75ae0db Bump timeout on research mode to match normal behaviour 2017-04-05 16:39:46 +01:00
Martyn Inglis
57bd6494e1 WIP - adding request timeout 2017-04-04 16:05:25 +01:00
Martyn Inglis
71289d36db Change to research mode.
Previously research mode created a task to fake the callback from the providers. This meant there is an extra task for each notification than would be generated in a live situation.

This PR changes that, so that a research mode/test key notification calls the callback API rather than make a task to do that .

This ensures that the flow for research mode more closely mimics that of live, and removes a task from the process so we can more accurately test throughput,
2017-01-24 14:24:58 +00:00
Rebecca Law
fb27a2d4c9 Changed the body of the request to use the right phone number, the phone number is not currently used in the callback logic but if it was then this may cause a problem.
Changed the test to use a 077009 series phone number.
2017-01-23 10:43:33 +00:00
Rebecca Law
5e3bb08860 The notification.to field is being formatted to be +447...
This meant that the research mode task would never work.
Also the way we mark data as "temporary-failure" with firetext is with first a pending status callback then a declined callback.
This PR changes the research mode task to account for that situation.
2017-01-20 13:17:53 +00:00
Rebecca Law
f1d8246395 Turns out the numbers in the research mode task were delivering.
This updates them to the dedicated "TV" numbers. Should never be real.
2017-01-19 14:42:39 +00:00
Rebecca Law
25db1bce74 Use the notification types enum for the notifications.notification_type.
Reuse EMAIL_TYPE in template_types and notification_types.
2016-06-29 11:50:54 +01:00
Leo Hemsted
fd2a0a0b10 fix firetext research mode requests
requests converts dicts into query parameters anyway if you don't specify so dont try and encode the data ourselves, also hardened up tests
2016-06-09 15:15:44 +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