Commit Graph

61 Commits

Author SHA1 Message Date
Ken Tsang
d6f6669610 Add comments for copying s3 objects 2018-03-21 16:33:49 +00:00
Ken Tsang
0c102f0727 Update letter utils for methods to handle virus process
- add function to get reference from filename
- add function to move pdf from scan folder to process folder
- add function to delete pdfs from scan bucket for failed virus scans
2018-03-20 10:12:59 +00:00
Ken Tsang
8733d84e75 Upload precompiled letter pdfs to letters-scan bucket 2018-03-20 10:11:36 +00:00
Ken Tsang
d40bc28f2a Add test-letters bucket for precompiled test keys
- uses moto to mock out boto3 for testing
2018-03-14 21:27:07 +00:00
Ken Tsang
c4e1d56492 Update letter utils to handle precompiled letters sent by test API keys
- precompiled letters sent using a test key should be put into a test-letters bucket
- also refactored code from test_letter_pdf_tasks
2018-03-14 18:15:00 +00:00
Ken Tsang
7011b90bd4 Refactor is_precompiled_letter to model 2018-03-07 23:03:03 +00:00
Ken Tsang
28136734e4 Refactor to use is_precompiled_letter in letters/utils.py 2018-03-06 13:04:57 +00:00
Richard Chapman
a4feaba309 Added tests to tests for precompiled flow and refactored a little
* Added is_precompiled_letter method to letter/utils.py
* Added tests for letter/utils.py
* Added tests for the rest endpoint
* Moved the Precompiled name to a central location
* Added hidden field to the test method to create a template
2018-03-05 14:11:37 +00:00
Richard Chapman
a9a67ce542 Updated API to handle pre-compiled pdfs
* added a method to letter/utils.py to get the PDF document from the S3
bucket
* added the logic to return the pdf or to produce a png of the pdf
2018-03-02 14:54:28 +00:00
Rebecca Law
891a80addf Added notification id to the log message for upload pdf to make it easier to search for the letter notification in the logs. 2018-03-01 10:37:07 +00:00
Alexey Bezhan
8971a5adce Upload pre-compiled letter PDF to S3
Pre-compiled letter endpoint uploads PDF contents to S3 directly
instead of creating a letter task to generate PDF using template
preview.

This moves some of the utility functions used by existing letter
celery tasks to app.letters.utils, so that they can be reused by
the API endpoint.
2018-02-23 17:52:25 +00:00