SuffolkLITLab / docassemble-AssemblyLine

Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
MIT License
42 stars 5 forks source link

Create a version of download_list_html that shows pre-assembled documents from a background task #788

Open nonprofittechy opened 11 months ago

nonprofittechy commented 11 months ago

See #84 #219

One quick solution for larger document sets is to use a background task to assemble documents. download_list_html currently assumes the documents are generated live to prevent folks from getting "stale" versions of the documents.

I think a quick way to help with document assembly problems is just to create some background tasks and a way to reconsider the task on the download screen that can be used manually for the interviews that we think need it now. We can still keep working on more robust/improved background assembly methods over time.

BryceStevenWilley commented 6 months ago

Started working on this finally: https://github.com/SuffolkLITLab/docassemble-AssemblyLine/tree/background_docs_24

Skeptical of getting it working consistently (it's not gonna work well if there are missing variables ever), but I'll see what I can do. I'll keep notes in commit messages.

nonprofittechy commented 6 months ago

@BryceStevenWilley pdf_1 is an ALDocument, which is internally a subclass of DADict which has the there_are_any requirement. But I also can't think of what code would be triggering enumeration of the ALDocument. That's not normally something we do--we only look at explicitly the 'final' or 'preview' keys.