Add task to resanitise and replace a PDF for precompiled letter

This adds a task which is designed to be used if we want to recreate the
PDF for a precompiled letter (either one that has been created using the
API or one that has been uploaded through the website).

The task takes the `notification_id` of the letter and passes template
preview the details it needs in order to sanitise the original file and
then replace the version in the letters-pdf bucket with the freshly
sanitised version.
This commit is contained in:
Katie Smith
2021-10-11 18:04:42 +01:00
parent ec9c3cac5f
commit 3d4796c924
3 changed files with 67 additions and 0 deletions

View File

@@ -77,6 +77,7 @@ class TaskNames(object):
SANITISE_LETTER = 'sanitise-and-upload-letter'
CREATE_PDF_FOR_TEMPLATED_LETTER = 'create-pdf-for-templated-letter'
PUBLISH_GOVUK_ALERTS = 'publish-govuk-alerts'
RECREATE_PDF_FOR_PRECOMPILED_LETTER = 'recreate-pdf-for-precompiled-letter'
class Config(object):