Commit Graph

1608 Commits

Author SHA1 Message Date
Rebecca Law
81a390f9c3 There are differences in the models to the database, this script
gets the database up to speed with the models.
2016-10-04 10:00:00 +01:00
Rebecca Law
8d188f4664 Merge pull request #700 from alphagov/refactor-send_notifications
Refactor send notifications
2016-10-03 14:54:25 +01:00
Rebecca Law
c66d4c3c59 fix checkstyle 2016-10-03 14:48:06 +01:00
Rebecca Law
f0772fe06b Updates for review comments.
Simplify mocker in parameterised tests.
Fix duplicate test name.
2016-10-03 14:26:36 +01:00
Rebecca Law
9e7a7b1857 Merge branch 'master' into refactor-send_notifications
Conflicts:
	tests/app/notifications/rest/test_send_notification.py
2016-10-03 11:40:31 +01:00
Rebecca Law
e3d418506a Create query to sum notificaitons for the message limit check, this is a bit more efficient.
Refactored send_notifications method so that it is more readible.
Refectored the test_send_notificaitons so that it uses parametrized test to avoid duplication.
2016-10-03 10:57:10 +01:00
minglis
1d9e8c03b1 Merge pull request #697 from alphagov/run-research-mode-queue-in-own-worker
Research mode will have own worker so removed from default config.
2016-09-30 14:48:16 +01:00
minglis
e760d0617e Merge pull request #698 from alphagov/fixing-the-build
Fixed build
2016-09-30 13:40:57 +01:00
Martyn Inglis
ad5222442a Fixed build
- passing a single param to a celery task must be done as a list not a tuple.
2016-09-30 13:34:44 +01:00
minglis
f7242e007e Merge pull request #696 from alphagov/research-mode-csv-file-queues
Research mode queue should be used for research-mode services
2016-09-30 12:39:14 +01:00
Martyn Inglis
19f2a6cb65 Added stop for research mode worker 2016-09-30 11:25:12 +01:00
Martyn Inglis
6ce85878d8 Added start for research mode worker 2016-09-30 11:23:54 +01:00
Martyn Inglis
a504343623 Research mode will have own worker so removed from default config.
this means normal celery workers WON'T process this queue. Requires a dedicated celery worker to do this.

- note development and test configs add it in so DEV and TEST builds require no change.
2016-09-30 11:14:36 +01:00
Martyn Inglis
e3ed8fad1a Merge branch 'master' into research-mode-csv-file-queues
Conflicts:
	tests/app/celery/test_tasks.py
	tests/app/notifications/rest/test_send_notification.py
2016-09-30 11:07:32 +01:00
Martyn Inglis
4e03f81fcf Updated mock import 2016-09-30 10:31:50 +01:00
bandesz
d27e1595d5 Always pull base Docker image before building 2016-09-29 17:16:16 +01:00
imdadahad
c2b57b79ee Merge pull request #689 from alphagov/service-whitelist
Service whitelist
2016-09-28 17:20:06 +01:00
Imdad Ahad
a7d42896cd Refactor tests 2016-09-28 17:03:17 +01:00
Imdad Ahad
8f74d9a122 Fix issue with test where team key does not check sending elegibility 2016-09-28 17:02:57 +01:00
Imdad Ahad
db608a05d2 Refactor sending elegibility function and update across files 2016-09-28 17:00:17 +01:00
Martyn Inglis
b9f0659eaa Ensure that when an API call is made on
- a TEST key
- a research-mode service

We put the task into the research-mode queue NOT the production delivery queue.
2016-09-28 15:48:12 +01:00
Martyn Inglis
3618a3967c Creating notification tasks should write send tasks to the research-mode queue if research mode service. 2016-09-28 15:29:10 +01:00
Martyn Inglis
20ccdab3bd Contract tests mock the new deliver_email|sms tasks 2016-09-28 15:28:45 +01:00
Martyn Inglis
c13ead77e4 Ensures that both the CSV processing and the API both use the new deliver_email and deliver_sms tasks not the old ones with the redundant parameter. 2016-09-28 15:05:50 +01:00
Martyn Inglis
9233ffa3d4 When processing a CSV file don't put the DB tasks into the live queue when service is in research mode. 2016-09-28 13:53:05 +01:00
Imdad Ahad
1222a6ddf3 Refactor to increase readability for getting whitelist objects 2016-09-28 10:16:10 +01:00
minglis
9df65dfe25 Merge pull request #695 from alphagov/rationalise-queues
Removed the unused queues from the config
2016-09-28 09:46:42 +01:00
Martyn Inglis
f4f0c73fec Removed the unused queues from the config 2016-09-28 09:45:19 +01:00
minglis
9f932597a4 Merge pull request #693 from alphagov/rationalise-queues
Rationalised the queues.
2016-09-28 09:07:37 +01:00
Martyn Inglis
4f3017c88b Old config reinstated for now.
Pull requests as was would mean that we didn't read from the old queues, so whilst the new code writes to the new "notify" queue, the old code would write to the old plethera of queues. And the readers may not pick it up depending on the order of the deploy.

Safer to leave readers reading from all queues until after the deploy then doing a second deploy to tidy up the config.
2016-09-28 09:03:45 +01:00
Martyn Inglis
a4b5b486c4 Merge branch 'master' into rationalise-queues 2016-09-28 08:57:59 +01:00
Imdad Ahad
f9b539d71e Fix conflict 2016-09-27 16:54:00 +01:00
minglis
b1654c8808 Merge pull request #686 from alphagov/refactor-send-tasks-into-shared-code
Refactor send tasks into shared code
2016-09-27 16:46:34 +01:00
minglis
7b69a4e53e Merge pull request #692 from alphagov/job-status-filter
add statuses filter to GET /service/{}/job
2016-09-27 15:31:50 +01:00
minglis
b2cb6891fc Merge pull request #694 from alphagov/remove-travis-image
Removed travis image
2016-09-27 14:58:37 +01:00
minglis
8dd93b350f Merge pull request #691 from alphagov/fix-template-type-bug
Fix template type bug
2016-09-27 14:51:43 +01:00
Imdad Ahad
af2cbaa9c5 Fix PEP8 issues 2016-09-27 14:16:35 +01:00
Imdad Ahad
d258e29edc Fix conflict 2016-09-27 14:05:29 +01:00
Imdad Ahad
99cfa7bae2 Fix url to get from whitelist endpoint 2016-09-27 13:51:43 +01:00
Imdad Ahad
3b592c8619 Update creating a sample service whitelist based on new data model 2016-09-27 13:50:23 +01:00
Imdad Ahad
7b0cbca89b Enable sending to whitelist users if using a normal api key 2016-09-27 13:48:51 +01:00
Imdad Ahad
f29c6c0bb2 Update to return 404 if invalid service id 2016-09-27 13:47:53 +01:00
Imdad Ahad
fbf266be87 Update ServiceWhitelist dao to conform to new data model 2016-09-27 13:45:36 +01:00
Imdad Ahad
8184eff15a Update ServiceWhitelist to conform to new data model 2016-09-27 13:44:29 +01:00
Imdad Ahad
005e8a9c3a Change data model to use single recipient address and type columns 2016-09-27 13:43:42 +01:00
Martyn Inglis
36425cd035 Removed travis image 2016-09-27 12:39:30 +01:00
Martyn Inglis
ce5b5fbf4c Rationalised the queues.
- the internal notify activites (send sms code, forgotten passwords etc) all not in a "notify" queue.
- deleted all unused queues
2016-09-26 12:35:59 +01:00
Chris Hill-Scott
76d3f08b46 Merge pull request #690 from alphagov/add-key-name-notifications
Add details of API key to notifications
2016-09-26 08:41:02 +01:00
Chris Hill-Scott
592b0d15da Merge pull request #687 from alphagov/optionally-get-test-notifications
Optionally get notifications created with a test key
2016-09-26 08:40:54 +01:00
Leo Hemsted
d3c0c48401 fix dao_get_jobs_by_service_id
statuses now defaults to correct val
2016-09-23 17:05:42 +01:00