Comment 12 for bug 1208875

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I wonder if another approach to fixing this issue would be to make the csv generation take effect in the background. It might not be possible to say that every csv export will take less time than the page timeout. If someone has 20K entries in their history for instance.

Something like:

1. Click Generate CSV Export.
2. Add a single pending event to an event_def that exists just to generate csv history exports.
3. Return a message to user that the csv export will take one to 5 minutes, the page will automatically reload every 30 seconds.
4. action_trigger_runner for the proper granularity runs every minute.
5. There is a new reactor that processes the template and stores the results in a file. Although the output exists in the DB ayway, so maybe that isn't needed. Maybe just an apache handler that can serve up action_trigger.event_output results by a GUID.
6. Once the results are done, the next page reload, or simply loading up the history page again would show a link to download the export.
7. Expire the export after a certain amount of time.

Or maybe the reporter system would work better, since it already has the guts to create export files and to serve them up to those with the correct authorization? It would be kind of nice to be able to tell the user that they will get an email when their export is done.

Josh