Commit Graph

26 Commits

Author SHA1 Message Date
Katie Smith
7f2e9f507e Delete functions which call the job statistics tasks
The JobStatistics table is going to be deleted. There are currently
3 tasks which use the JobStatistics model via the Statistics DAO, so we
need to make sure that these tasks aren't being used before they are
deleted in a separate PR.

This commit deletes:
* The `create_initial_notification_statistic_tasks` function which gets
used to call the `record_initial_job_statistics` task.
* The `create_outcome_notification_statistic_tasks` function which gets
used to call the `record_outcome_job_statistics` task.
* And the scheduling of the `timeout-job-statistics` scheduled task.
2018-03-07 09:23:29 +00:00
venusbb
cef8d6e294 use callback queue 2017-12-13 11:55:08 +00:00
venusbb
5482ee4fe7 - wrap apply_async parameter notification_id in a str() argument
- check if service_callback_api exist before putting tasks on queue
- create_service_callback_api in tests before asserting if send_delivery_status_to_service has been called.
2017-12-04 17:58:38 +00:00
venusbb
096657799c Added send delivery status to SES callbacks 2017-12-01 21:13:01 +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
890604990d remove unneccessary ses endpoint tests 2017-11-17 10:31:34 +00:00
Leo Hemsted
5855adf826 removed unused HTTP ses callback handler 2017-11-16 17:53:19 +00:00
Leo Hemsted
1f317b6717 log the bounce message from SES 2017-11-16 17:46:58 +00:00
Rebecca Law
168231f3ce Downgrade the error message to a warning. 2017-11-03 12:09:20 +00:00
Rebecca Law
efe0f3b99b Downgrade error to warning 2017-11-03 10:15:09 +00:00
Richard Chapman
d6cff97b7b Review Changes
- Updated the retry and max_retries of the process_ses_results celery
task to be the same as other retry strategies in that file
- Provided a message with the 200 to be similar to how other responses
are handled
2017-10-26 12:23:19 +01:00
Richard Chapman
0494ef3ea7 Removed the HTTP error and arguments from notification_ses_callback.py
In preparation for moving the SNS notification to an SES queue remove
the HTTP errors codes and arguments as the method will now be run by
a celery task. Also made the callback http method return more generic
codes as this will be removed in the longer term.

- Removed errors and arguments returned from process_ses_response
- Updated tests
2017-10-26 12:23:19 +01:00
Athanasios Voutsadakis
3443dcea53 Temporary test fix
This should be removed when the SES endpoint is removed
2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
644b31ba75 Update tests 2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
892eaede13 We no longer have guaranteed access to a request context 2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
865cb6656e Allow for both an endpoint callback and SQS consumption 2017-10-26 12:14:33 +01:00
Martyn Inglis
83a1b1526e Merge branch 'master' into async-job-stats
Conflicts:
	app/notifications/notifications_ses_callback.py
2017-05-17 09:49:43 +01:00
Imdad Ahad
4003edfa67 Add DVLA callback:
* Process SNS callback, trigger the update notifications celery task
* Put autoconfirm into its own method and use in callbacks
2017-05-15 11:12:31 +01:00
Imdad Ahad
7a10a91262 Revert "Process SNS request triggered by a DVLA S3 update" 2017-05-12 17:21:07 +01:00
Imdad Ahad
4d82512ec6 Update SES callback to use autconfirm method 2017-05-12 14:24:27 +01:00
Martyn Inglis
caed193647 Use the new task wrapper methods rather than creating a task directly 2017-05-09 18:17:55 +01:00
Athanasios Voutsadakis
cfed90e502 Make code a bit more defensive and add som logging 2017-04-28 16:10:41 +01:00
Athanasios Voutsadakis
74433c9335 Add tests for autoconfirmation 2017-04-28 15:11:36 +01:00
Athanasios Voutsadakis
04b003c152 Add utility function for subscription autoconfirm 2017-04-28 15:11:36 +01:00
Rebecca Law
37293b6c7a Added a test to ensure that all blueprints have a registered before_request method.
Added a test for the status endpoint.
2017-03-17 16:21:41 +00:00
Rebecca Law
78242812ef Register a before_request event for all blueprints, that defines the authentication requirement.
There are three authentication methods:
 - requires_no_auth - public endpoint that does not require an Authorisation header
 - requires_auth - public endpoints that need an API key in the Authorisation header
 - requires_admin_auth - private endpoint that requires an Authorisation header which contains the API key for the defined as the client admin user
2017-03-16 18:15:49 +00:00