Martyn Inglis
2c51535b7e
Merge branch 'master' into email-templates
2016-02-22 13:12:41 +00:00
Martyn Inglis
886b206d63
Merge branch 'master' into email-templates
...
Conflicts:
app/user/rest.py
tests/app/user/test_rest.py
2016-02-22 13:12:24 +00:00
minglis
00bd4da0f0
Merge pull request #88 from alphagov/fix_send_email_code
...
Fixes added.
2016-02-22 13:10:46 +00:00
Nicholas Staples
c8bb96b883
Fixes added.
2016-02-22 13:02:09 +00:00
Adam Shimali
4516dc4331
Merge pull request #85 from alphagov/add_permissions_to_models
...
Permissions added.
2016-02-22 11:14:14 +00:00
Nicholas Staples
180caf3ce6
Merge with master
...
.
2016-02-22 11:07:37 +00:00
Adam Shimali
25f57523a0
Merge pull request #84 from alphagov/refactor-user-rest
...
Refactor user/<user_id>/code into two endpoints.
2016-02-22 10:05:53 +00:00
Martyn Inglis
cc720b137f
Merge branch 'master' into email-templates
...
Conflicts:
app/user/rest.py
2016-02-19 17:33:28 +00:00
Martyn Inglis
98314485d3
Generate the email_from from the service name.
2016-02-19 17:07:59 +00:00
Rebecca Law
04ca1bc00f
Remove code_type
2016-02-19 16:06:45 +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
1a136885c3
Update service rest class to handle new fields and updated dao
2016-02-19 15:53:45 +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
f8ac14ea30
Update model
...
- adds email_from field to the service model
- adds subject_line to the template model
These are unique and not null fields, so there is a migration here for email_from to populate it.
2016-02-19 15:52:19 +00:00
Nicholas Staples
0396148853
Permissions added.
2016-02-19 14:47:45 +00:00
Rebecca Law
17d14f291e
Refactor user/<user_id>/code into two endpoints.
...
- Created new endpoint user/<user_id>/sms-code to send the sms verification code to the user.
- Create new endpoirtn user/<user_id>/email-code to send the email verifcation code to the user.
- Marked the old methods, schema, tests with a TODO to be deleted when the admin app is no longer sending messages to /user/<user_id>/code
- Added error handlers for DataError and NoResultFound. Data error catches invalid input errors.
- Added error handler for SqlAlchemyError which catches any other database errors.
- Removed the need for the try catches around the db calls in the user endpoints with the addition of the db error handlers.
- We may want to wrap db excpetions in the dao, if we want the No results found message to be more specific and say no result found for user.
2016-02-19 11:37:35 +00:00
Rebecca Law
9ea2acfdae
Use dashes in the celery queue names
2016-02-18 11:18:35 +00:00
minglis
9b99782662
Merge pull request #83 from alphagov/celery-send-email-code
...
Celery send email code
2016-02-18 11:03:23 +00:00
Rebecca Law
4d9d511575
Merge pull request #81 from alphagov/celery-send-sms-code
...
Use Celery to send sms code
2016-02-18 10:51:16 +00:00
Rebecca Law
aff948e9ca
Merge branch 'celery-send-sms-code' into celery-send-email-code
...
Conflicts:
app/celery/tasks.py
app/user/rest.py
scripts/run_celery.sh
2016-02-18 10:50:14 +00:00
Rebecca Law
b286b4356c
Update queue name with dashes
2016-02-18 10:45:25 +00:00
Rebecca Law
3ce6758f3e
Change names for clarity sake.
...
Rename test.
What we do when the validation_code fails to send is still to be decided.
2016-02-18 09:59:18 +00:00
Rebecca Law
c1df61a7d4
Use celery to send the email verification code.
2016-02-18 09:52:27 +00:00
Rebecca Law
9073814d9f
I have an issue with the test, not sure why?
2016-02-17 17:48:23 +00:00
NIcholas Staples
13b7a89c8c
Merge pull request #82 from alphagov/db-error-handling
...
Wire up error handlers.
2016-02-17 17:23:27 +00:00
Adam Shimali
4f33b6f406
Wire up error handlers.
...
Replace some 400s with more appropriate 500s.
DAO methods that cause unexpected exceptions get caught and
logged by errors.py 500 error handler.
2016-02-17 17:04:50 +00:00
Rebecca Law
66cf6cfd30
Use Firetext client
2016-02-17 15:52:09 +00:00
Rebecca Law
7afa87c367
Merge branch 'master' into celery-send-sms-code
...
Conflicts:
tests/app/celery/test_tasks.py
2016-02-17 15:43:57 +00:00
Rebecca Law
d022d036dc
Celery task to send the sms verify code.
...
Each celery task will use it's own queue.
2016-02-17 15:41:33 +00:00
NIcholas Staples
b98d8b9996
Merge pull request #80 from alphagov/fire-text-client
...
Fire text client
2016-02-17 14:55:02 +00:00
Martyn Inglis
53bdedf8f3
Test properties for firetext
2016-02-17 14:27:28 +00:00
Martyn Inglis
36eee56f17
Adding boto for python2 as Celery seems to need it.
2016-02-17 14:03:40 +00:00
Martyn Inglis
837c9b7cdb
Removed logging, and make fire text only client.
2016-02-17 13:59:01 +00:00
Rebecca Law
c7cebc4d00
Merge pull request #78 from alphagov/move-sms-notifications-into-celery
...
Move sms notifications into celery
2016-02-17 13:29:45 +00:00
Martyn Inglis
226459132a
Basic (Very basic) implementation of the fire text API.
...
[https://www.firetext.co.uk/docs#sendingsms ](https://www.firetext.co.uk/docs#sendingsms )
Not to be merged. This API has a limit on it at the moment that will need to be removed before it is used in anger.
2016-02-17 12:57:51 +00:00
Rebecca Law
d6bea65626
Merge branch 'move-sms-notifications-into-celery' into celery-send-sms-code
2016-02-17 11:50:36 +00:00
Martyn Inglis
58ae041b64
AWS scripts for celery
2016-02-17 11:36:14 +00:00
Martyn Inglis
e59e66fa21
Run celery needed to read in secrets
2016-02-17 11:25:57 +00:00
Martyn Inglis
cebca61f8e
Travis deploy group for delivery version of api
2016-02-17 11:21:49 +00:00
Martyn Inglis
95cdfe08d1
Updated logging in run-celery script to log to application logs
...
- poll every second
- visibility of 1 minute
2016-02-17 11:18:27 +00:00
Rebecca Law
5f4b6a7db9
Fix db.py script for credstash secrets
2016-02-17 11:01:15 +00:00
NIcholas Staples
ab1279116f
Merge pull request #77 from alphagov/clarify-readme
...
Updated sample values for secret keys in environment.sh to match
2016-02-17 10:29:44 +00:00
Martyn Inglis
e0e47b40fc
Setup celery config
2016-02-17 10:22:25 +00:00
Adam Shimali
914b650a46
Updated sample values for secret keys in environment.sh to match
...
that suggested in delivery app.
Called out the reason for unique prefixes or queue names.
2016-02-17 10:20:40 +00:00
Chris Hill-Scott
bb88fd79dc
Merge pull request #76 from alphagov/update-readme
...
Update README with set up instructions.
2016-02-17 09:58:21 +00:00
Rebecca Law
8b4641021a
Update README with set up instructions.
2016-02-17 09:49:36 +00:00
Martyn Inglis
85a8e6d2b4
Added moto back for methods not yet celery'd
2016-02-17 09:47:34 +00:00
Martyn Inglis
ec8955503f
Twilio params into setup file for tests
2016-02-17 09:34:57 +00:00
Martyn Inglis
73d0e67e68
Removed alpha api client
2016-02-17 09:22:06 +00:00
Martyn Inglis
cb265896a7
Merge branch 'master' into move-sms-notifications-into-celery
...
Conflicts:
app/__init__.py
tests/conftest.py
2016-02-17 09:14:37 +00:00