Commit Graph

4292 Commits

Author SHA1 Message Date
Leo Hemsted
1ca252dcf9 put pdfs in tomorrow's dvla bucket after 17:30
So if someone sends a letter in the evening, it gets picked up the
next day
2017-12-15 11:47:52 +00:00
kentsanggds
42318cc335 Merge pull request #1488 from alphagov/ken-update-letters_pdf-billable_units
Update billable units for letters pdf task
2017-12-14 16:30:20 +00:00
kentsanggds
5dc238671f Merge branch 'master' into ken-update-letters_pdf-billable_units 2017-12-14 16:16:00 +00:00
kentsanggds
cf8770d0c1 Merge pull request #1494 from alphagov/ken-rename-create-letters-pdf-queue
Create letters pdf queue was renamed with tasks, but was lost in another merge
2017-12-14 16:14:04 +00:00
Ken Tsang
0ad43f0c5b Create letters pdf queue was renamed with tasks, but was lost in another merge
- needs to be correct name otherwise the delivery worker will not pick up the queue
2017-12-14 16:00:51 +00:00
Leo Hemsted
87ea027824 Merge pull request #1493 from alphagov/error-on-app-crash
fix makefile syntax
2017-12-14 15:32:02 +00:00
Leo Hemsted
7d1c4ea722 fix makefile syntax 2017-12-14 15:16:43 +00:00
Ken Tsang
0045cd6b72 Use dao_update_notification to update billable_units for letter notifications 2017-12-14 15:09:25 +00:00
Ken Tsang
f23074596b Update billable units for letters pdf task 2017-12-14 15:09:25 +00:00
Leo Hemsted
5430eb9fc7 Merge pull request #1491 from alphagov/error-on-app-crash
if apps crash on startup, then fail deploy process
2017-12-14 15:06:12 +00:00
Leo Hemsted
c6e6fad01f if apps crash on startup, then fail deploy process
we saw an issue where the app started, then immediately crashed due to
a setup error. However, jenkins had already returned positively, and
the deploy continued.

cf-deploy should fail if the app doesn't start up.

We do this by looking through the cloudfoundry events, and aborting
if there are any `app.crash` events for the new GUID.
2017-12-14 14:23:32 +00:00
Leo Hemsted
304d500078 Merge pull request #1490 from alphagov/leohemsted-patch-1
Can't have spaces between queue names in manifest
2017-12-14 13:51:00 +00:00
Leo Hemsted
5d3a3ab042 Can't have spaces between queue names 2017-12-14 13:26:38 +00:00
Venus Bailey
a9a8ef8ff1 Merge pull request #1489 from alphagov/vb-callback-seperate-queue
Create and use separate queue for callbacks
2017-12-14 11:04:26 +00:00
venusbb
2e7b3cf5e5 Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-callback-seperate-queue 2017-12-14 10:29:31 +00:00
kentsanggds
b37cd69650 Merge pull request #1487 from alphagov/ken-update-delivery-base-letters-pdf-task
Add create-letters-pdf-tasks to notify-delivery-worker
2017-12-14 10:27:26 +00:00
venusbb
c81c89a9e6 Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-callback-seperate-queue 2017-12-13 11:56:03 +00:00
venusbb
cef8d6e294 use callback queue 2017-12-13 11:55:08 +00:00
Ken Tsang
fdf97fd8b5 Add create-letters-pdf-tasks to notify-delivery-worker 2017-12-13 11:34:05 +00:00
venusbb
11152ab117 Add new queue for callbacks 2017-12-13 10:57:08 +00:00
Chris Hill-Scott
c143b480d2 Merge pull request #1481 from alphagov/hr
Add undocumented support for <hr>s in emails
2017-12-13 10:40:46 +00:00
Chris Hill-Scott
c09511bc41 Merge branch 'master' into hr 2017-12-13 10:28:17 +00:00
Venus Bailey
dbd4f96459 Merge pull request #1458 from alphagov/remove-fragments-from-db
remove fragments from db
2017-12-13 10:11:52 +00:00
Pete Herlihy
5b2d62fe10 Merge branch 'master' into hr 2017-12-13 10:06:06 +00:00
venusbb
689ece75a0 db version change 2017-12-13 10:03:40 +00:00
Leo Hemsted
df725aaff0 Merge branch 'master' into remove-fragments-from-db 2017-12-12 17:07:04 +00:00
kentsanggds
d18b81093c Merge pull request #1484 from alphagov/ken-add-template-preview-to-cf
Add template preview host url and key to cf config
2017-12-12 17:01:15 +00:00
Pete Herlihy
c8f7f3d0fe Merge branch 'master' into hr 2017-12-12 16:38:30 +00:00
Leo Hemsted
ea71af695d Merge branch 'master' into remove-fragments-from-db 2017-12-12 16:32:07 +00:00
kentsanggds
8081ba9438 Merge branch 'master' into ken-add-template-preview-to-cf 2017-12-12 14:57:04 +00:00
Ken Tsang
ebfd78f3cf Add template preview host url and key to cf config 2017-12-12 14:53:38 +00:00
kentsanggds
ea8135c69a Merge pull request #1479 from alphagov/ken-add-letters-pdf-task
Add letters pdf task & api
2017-12-12 13:37:25 +00:00
Ken Tsang
da93ba296e Refactored notifications_dao
- Introduce a `_raise` flag for `get_notification_by_id` so that sql alchemy will raise the NoResults error rather than the app
- Refactor `dao_set_created_live_letter_api_notifications_to_pending` to use a join for getting services that don't have `letters_as_pdf` as marginally faster.
2017-12-12 12:07:55 +00:00
Ken Tsang
ab72d6f555 Call the create letters pdf task in api calls for services with letters as pdf 2017-12-12 12:07:55 +00:00
Ken Tsang
f42df8af73 Ignore services that have letters_as_pdf permission
- We don't want to process the letters as a build file for api calls when the service is generating letters as pdf.
2017-12-12 12:07:55 +00:00
Ken Tsang
d0fcfa7d0c Update sample_service_full_perms to leave out letters_as_pdf permissions
- as letters_as_pdf is a temporary service permission until the build dvla file process is deprecated rather than update all the tests to remove the permission so that they pass, lets remove it here instead
2017-12-12 12:07:55 +00:00
Ken Tsang
3e71e9a294 Update save_letter to handle research mode 2017-12-12 12:07:55 +00:00
Ken Tsang
02b67c95e5 Use crown flag from service 2017-12-12 12:07:55 +00:00
Ken Tsang
3464336aff Refactored tasks.py to split out letters_pdf tasks
- Added has_permission helper in models.py to check permission in service
- Moved letters pdf tasks to separate file
- Moved letters pdf tests to own file
2017-12-12 12:07:55 +00:00
Ken Tsang
aca52952d8 Add tests for letters as pdf permission
- test that `create_letters_pdf` only gets called when `letters_as_pdf` permission set
- test that `build_dvla_file` does not get called when `letters_as_pdf` permission set
- test creating the pdf call to notifications template preview service
- test uploading the data to s3 calls upload_letters_pdf function
2017-12-12 12:07:55 +00:00
Ken Tsang
7970cd3d4e Update test for queue names 2017-12-12 12:07:55 +00:00
Ken Tsang
bc316dd1fe Add reference as part of sample_letter_notification 2017-12-12 12:07:55 +00:00
Ken Tsang
9784ee438a Refactored code in tasks.py 2017-12-12 12:07:55 +00:00
Ken Tsang
6b118ec1ef Add create-letters-pdf queue name 2017-12-12 12:07:55 +00:00
Ken Tsang
bad129c5e9 Add extra logging for upload_letters_pdf 2017-12-12 12:07:55 +00:00
Ken Tsang
16136317f9 Add letters pdf task 2017-12-12 12:07:55 +00:00
Ken Tsang
c8a434fe98 Updated config for template preview env vars 2017-12-12 12:07:55 +00:00
Rebecca Law
5a68793e7e Merge pull request #1482 from alphagov/update-callback-json
Update JSON in callback task
2017-12-12 10:03:04 +00:00
Rebecca Law
a26588decd Update the json in the service callback task to read completed_at rather than updated_at 2017-12-11 17:14:36 +00:00
Chris Hill-Scott
02c105328c Add undocumented support for <hr>s in emails
Implements:
- [x] https://github.com/alphagov/notifications-utils/pull/275/files
2017-12-11 16:37:16 +00:00