mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-30 11:18:54 -04:00
add collate-letter-pdfs task
add collate-letter-pdfs task (name pending). This retrieves a list of letter pdf files (just the metadata, not the actual data) from s3, and loops through them, calling the ftp task zip-and-send-letter-pdfs. It groups them up by adding them to lists while counting the total filesize, if it gets over a certain filesize (currently set to 500mb) it breaks at that chunk, sends off that list of files to the ftp app, and then starts building up a new list. DVLA have a hard 2gb limit on how big the zip files we can send is - however we're going to be limited by the amount of memory on the ftp app well before we get around to handling 2gb of pdf data - so the limit is 500mb for now. We'll adjust it after we see how ftp performs.
This commit is contained in:
@@ -57,6 +57,7 @@ class TaskNames(object):
|
||||
DVLA_JOBS = 'send-jobs-to-dvla'
|
||||
DVLA_NOTIFICATIONS = 'send-api-notifications-to-dvla'
|
||||
PROCESS_INCOMPLETE_JOBS = 'process-incomplete-jobs'
|
||||
ZIP_AND_SEND_LETTER_PDFS = 'zip-and-send-letter-pdfs'
|
||||
|
||||
|
||||
class Config(object):
|
||||
@@ -127,6 +128,8 @@ class Config(object):
|
||||
ONE_OFF_MESSAGE_FILENAME = 'Report'
|
||||
MAX_VERIFY_CODE_COUNT = 10
|
||||
|
||||
MAX_LETTER_PDF_ZIP_FILESIZE = 500 * 1024 * 1024 # 500mb
|
||||
|
||||
CHECK_PROXY_HEADER = False
|
||||
|
||||
NOTIFY_SERVICE_ID = 'd6aa2c68-a2d9-4437-ab19-3ae8eb202553'
|
||||
|
||||
Reference in New Issue
Block a user