Leo Hemsted
7801efd5ca
don't create job if template has been archived
2016-05-24 13:08:02 +01:00
Leo Hemsted
5ebae9c66c
only return unarchived templates when getting all templates
...
get_specific_template functions happily return archived templates
2016-05-23 14:20:02 +01:00
Rebecca Law
cf2723bdc9
If the sms client provider sends more than one delivery receipt only take the update for the the first one.
...
Only update the notification.status if status = sending.
2016-05-20 17:04:56 +01:00
Rebecca Law
a8c79bf80d
Merge pull request #334 from alphagov/case-insensitive-email
...
Make the get_user_by_email_address case insensitive.
2016-05-20 15:55:38 +01:00
Leo Hemsted
81e5eb2c0a
return all zeros when NotificationStatistics dont exist
2016-05-20 15:24:57 +01:00
Rebecca Law
0f9a019945
Make the get_user_by_email_address case insenstive.
2016-05-20 13:43:31 +01:00
Leo Hemsted
1b27c15c16
/notifications/statistics now takes 'day' parameter
...
avoids potential issues with date.today being inconsistent with user timezone
2016-05-20 11:31:35 +01:00
Leo Hemsted
f7768366a1
added test_notification_statistics file
...
put in new rest subfolder in anticipation of refactoring test_rest.py
2016-05-20 09:57:31 +01:00
Nicholas Staples
1797d9360b
Update template json to return created_at and updated_at. Also fixed a bug where updated_at was not being added to the templates_history model.
2016-05-19 17:02:55 +01:00
NIcholas Staples
e0f6b4e571
Merge pull request #327 from alphagov/add_job_row_number
...
Added job row number to the notification for csv jobs. All tests pass…
2016-05-19 14:33:21 +01:00
Adam Shimali
955005d7fe
Added additional outcome status codes to mmg responses.
2016-05-19 11:27:22 +01:00
Nicholas Staples
0fe0c1d2b4
Added job row number to the notification for csv jobs. All tests passing.
2016-05-19 10:46:03 +01:00
NIcholas Staples
03df991b38
Merge pull request #326 from alphagov/test_task_bug
...
Fix test to check for decrypted dictionary value.
2016-05-18 16:22:45 +01:00
Nicholas Staples
c46216dd96
Fix test to check for decrypted dictionary value.
2016-05-18 14:28:19 +01:00
Nicholas Staples
15607c0977
Add server_commands and update readme.md
...
Update command to search for services from the user.
2016-05-18 12:20:56 +01:00
Nicholas Staples
6e7383de33
Removed template subject uniqueness
2016-05-18 10:00:09 +01:00
Rebecca Law
d0da4e1ef2
Merge branch 'master' into email-failures
2016-05-17 15:41:00 +01:00
Rebecca Law
281a93b32d
Update ses callback to interpret hard and soft bounces.
...
If the notification has a status == sending then update the status otherwise do not update the status.
In other words do not change the status more than once.
2016-05-17 15:38:49 +01:00
Adam Shimali
e1685d6a45
Was incorrectly setting from not reply to
2016-05-17 14:31:33 +01:00
Rebecca Law
4762aef1aa
Merge pull request #318 from alphagov/tech-failures
...
New notification status types
2016-05-17 13:50:57 +01:00
Rebecca Law
191a79f27b
Add new failure status for notifications.
2016-05-17 13:06:08 +01:00
Adam Shimali
3812dac3fe
Missing mock
2016-05-17 12:49:37 +01:00
Adam Shimali
642fb6f68b
Process job for email uses reply to if present
2016-05-17 12:41:13 +01:00
Adam Shimali
682ea55d9e
[WIP] save reply to email address on service
2016-05-17 10:56:02 +01:00
Rebecca Law
992f9d78f9
There is a problem where columns on the templates table were not set.
...
It is also discovered that columns that have a default value and use the version mixin must set the value when creating the db object before the insert otherwise the history table will be missing the default value.
Updated the templates_history.created_by_id with a value where missing, using the current version of the template for this value.
Update templates_history.archived to false. This is okay as we do not yet have a way to set this value to true.
Removed the versions attribute from the TemplateSchema, there is not a need for this column.
2016-05-16 16:16:14 +01:00
minglis
3c751d94a4
Merge pull request #309 from alphagov/statsd-integration
...
Statsd integration
2016-05-16 12:29:14 +01:00
Martyn Inglis
785def9117
Timed the tasks - how long to process a task / a sms-send / a email-send
2016-05-16 11:55:00 +01:00
Martyn Inglis
a60e11a1b6
Fixed test bug due to pluralisation typo
2016-05-13 17:25:34 +01:00
Martyn Inglis
a520dcef47
Fixed some more pep8
2016-05-13 17:22:03 +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
Rebecca Law
faff5fff55
Merge branch 'master' into add-template-version
2016-05-13 16:32:57 +01:00
Rebecca Law
917110870d
Use the template version at the time the notification is created or at the time the job is created.
...
Update notifications/sms|email endpoint to send the template version to the queue.
Update the process_job celery talk to send the template version to the queue.
When the send_sms|send_email task runs it will get the template by id and version.
Created a data migration script to add the template_vesion column for jobs and notifications.
The existing jobs and notifications are given the template_version of the current template.
There is a chance this is the wrong template version, but deemed okay since the application is not live.
Create unit test for the dao_get_template_versions method.
Rename /template/<id>/version to /template/<id>/versions which returns all versions for that template id and service id.
2016-05-13 16:25:05 +01:00
Martyn Inglis
06bfe81329
Load testing client added
2016-05-12 10:46:35 +01:00
Rebecca Law
c8c0f95dd2
Merge branch 'master' into add-template-version
...
Conflicts:
tests/app/dao/test_notification_dao.py
2016-05-12 09:49:35 +01:00
Rebecca Law
f223da04df
[WIP] Fix for dao test
2016-05-12 09:20:49 +01:00
Rebecca Law
f72f5aba05
[WIP]
...
Start to add template_version to jobs and notification
2016-05-11 17:04:51 +01:00
Martyn Inglis
09b3313ce3
Merge branch 'master' into primary-provider
...
Conflicts:
tests/app/dao/test_provider_rates_dao.py
2016-05-11 14:04:15 +01:00
Martyn Inglis
42c42bfdc9
Added tests to ensure pick correct provider from the database in the celery tasks.
2016-05-11 14:03:12 +01:00
Rebecca Law
829922e61f
Merge pull request #298 from alphagov/add-user-to-job
...
Add created_by for jobs
2016-05-11 12:18:29 +01:00
Rebecca Law
eb9f47af68
Merge branch 'master' into add-user-to-job
2016-05-11 12:08:39 +01:00
Rebecca Law
aff0abb78c
Add a load only and dump only for the created_by attribute of the JobSchema
2016-05-11 12:03:25 +01:00
Nicholas Staples
03f15d6af9
Update now to utcnow. All tests passing.
2016-05-11 10:56:24 +01:00
Martyn Inglis
9e71759e57
Added get provider by id
2016-05-10 15:18:41 +01:00
Nicholas Staples
083d3d75ae
Add user details to template schema dump.
2016-05-10 14:55:59 +01:00
Martyn Inglis
8669a169eb
Merge branch 'master' into primary-provider
...
Conflicts:
app/dao/notifications_dao.py
app/dao/provider_statistics_dao.py
app/schemas.py
tests/app/conftest.py
2016-05-10 09:13:02 +01:00
Martyn Inglis
571686b638
Ensure that the primary provider is used in all tasks
2016-05-10 09:04:22 +01:00
Nicholas Staples
b28474d74c
Get all versions for a template endpoint added.
2016-05-09 15:59:34 +01:00
NIcholas Staples
f06aaa924e
Merge pull request #287 from alphagov/statistics_group_by_week_backup
...
Group by Notification Statistics added and all tests working.
2016-05-09 10:17:37 +01:00
NIcholas Staples
448d1058b8
Merge pull request #288 from alphagov/purge_functional_test_data
...
Purge functional tests command added with passing test.
2016-05-09 10:17:25 +01:00