If a user chooses to download a .PDF report, there is currently a long wait for the file to be created. * [ ] Ensure this is still the case, especially after new logic is created to generate more printable map images (#421 ) We can speed this up by triggering the creation the .PDFs when the report is loaded. * [ ] On report load, check if the .PDF exists or is currently being created ('running') * [ ] The report model should track: * [ ] Status of .PDF creation ('pending', 'running', 'complete') * [ ] Date of last attempt to create .PDF (to detect 'hung' processes) * [ ] If file does not exist and status is not 'running' (or 'run date' is over 30 minutes old): * [ ] Ensure any required data (like map images) are created and ready * [ ] Create 'full report' .pdf * [ ] Remove any logic that triggers .PDF creation when users click the full-report 'download' button * [ ] Single-section reports (see #425 ) should be snappy without pre-rendering since the images were all created for the 'full-report'
If a user chooses to download a .PDF report, there is currently a long wait for the file to be created.
We can speed this up by triggering the creation the .PDFs when the report is loaded.