Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move user data export to background tasks #2954

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

amCap1712
Copy link
Member

User data exports take a long time and get disrupted because the request times out during the process. To fix the issues, do the exports to an archive in the background and allow the users to download the archive later. Archives are auto-deleted after a fixed period.

TODO:

  1. Create docker volume to store exports and update consul config in production.
  2. Discuss with @zas where to store the export and possibility of using gateways for a speed up.
  3. Discuss with @MonkeyDo to add a screen for users to view their completed export and download it, also update the existing export frontend.
  4. Add tests.

@pep8speaks
Copy link

pep8speaks commented Aug 6, 2024

Hello @amCap1712! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 198:19: E222 multiple spaces after operator
Line 207:32: W291 trailing whitespace
Line 257:1: E302 expected 2 blank lines, found 1

Line 37:131: E501 line too long (148 > 130 characters)

Comment last updated at 2024-09-17 09:43:40 UTC

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's chat about the UI for ongoing tasks.
Happy to see this PR!

admin/sql/updates/2024-08-06-add-background-export.sql Outdated Show resolved Hide resolved
@MonkeyDo
Copy link
Contributor

Initial suggestions for the UI:

I reckon we want to show any ongoing export (along with progress, download links eventually) on the same page it was initially requested, at the top of the page.

Maybe something like this?
image

image

@Aerozol might have some valuable input and suggestions?

@Aerozol
Copy link
Contributor

Aerozol commented Aug 12, 2024

I don't see any issue with that UI. Additional thoughts:

  • If users can leave and come back later we could include the date + time of when the export was requested (or the date/time of the last listen in the export could be more useful)
  • If requesting an export is about to overwrite a current one we might want to indicate that (or just a small note like "will reset any current exports").

@amCap1712
Copy link
Member Author

@MonkeyDo I have endpoints to retrieve existing and in progress exports, and also the current progress of a given export. I think we should also add a table of available exports to the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants