Skip to content
Luke Baker edited this page Sep 18, 2015 · 2 revisions

CSV Data Exports

Administrators of a wiki survey may request CSV exports of their survey data on the wiki survey manage page.

Process Overview

Note: This only applies to installations that are running allourideas.org >= v3.3.0 and pairwise >= v3.2.0. Prior versions relied on a shared redis instance to communicate the intermediate CSV data.

When running your own installation of pairwise and AOI you'll need to ensure that both pairwise and AOI have their delayed_jobs processes running. Here's an overview of how the CSV export process works:

  1. Administrator requests a CSV export from the AOI wiki survey manage page.
  2. AOI creates a unique name for the requested CSV export.
  3. AOI notifies pairwise that an export has been requested and sends the unique name. When parwise receives this request it creates its own delayed job to run that will export the CSV data.
  4. AOI creates a its own delayed job called MungeAndNotifyJob

The pairwise delayed job in step #3 will create an initial CSV file that will later be downloaded and modified by the delayed job in step #4. Once the pairwise delayed job in step #3 is complete, the pairwise server makes the CSV available for download to AOI (not the end user).

The AOI delayed job created in step #4 will attempt to download the CSV file generated by pairwise using the unique name for the export. If pairwise hasn't completed the export, then pairwise will return a 404 error and the AOI delayed job will fail. The delayed job will be retried up to 5 times. If pairwise has completed the export of the CSV, the AOI delayed job will download the CSV file, make some modifications to that CSV file, and then notify the user that the export is ready.

Common Problems

  • If either pairwise or AOI don't have anything processing their delayed jobs, then the CSVs will not be generated.
  • If emails aren't being properly sent from the server, the CSV process might be completing successfully but the user will not know.