As we move to asynchronous report generation, we need to store the report csv in the bucket when it is finished, so the UI can access it for download.
Store the reports in the form:
reports/service_id/user_id/number_of_days_in_report/report.csv. If an old report already exists, delete it before doing the upload.
This way there is always only one copy of each report (1,3,5,7 day) for each user, and it is the latest version. The normal csv deleting job should remove reports more than 7 days old (but we should verify that).
As we move to asynchronous report generation, we need to store the report csv in the bucket when it is finished, so the UI can access it for download.
Store the reports in the form:
reports/service_id/user_id/number_of_days_in_report/report.csv. If an old report already exists, delete it before doing the upload.
This way there is always only one copy of each report (1,3,5,7 day) for each user, and it is the latest version. The normal csv deleting job should remove reports more than 7 days old (but we should verify that).