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

Peroidic tasks to remove incomplete file uploads #1326

Open
yaswanthsaivendra opened this issue May 29, 2023 · 6 comments
Open

Peroidic tasks to remove incomplete file uploads #1326

yaswanthsaivendra opened this issue May 29, 2023 · 6 comments

Comments

@yaswanthsaivendra
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, I believe we don't have a logic for deleting the incomplete s3 file uploads.

Describe the solution you'd like
Create a periodic_task which handles the deletion of incomplete s3 file uploads.

soln I'm thinking of - the function would be deleting the files which are created till yesterday and are having upload_completed=False

@yaswanthsaivendra
Copy link
Contributor Author

Hello team,
Lemme know if its a relevant issue, if so I would like to work upon it!

@rithviknishad
Copy link
Member

rithviknishad commented May 30, 2023

Not sure how relevant or required this is.

But what comes to my mind at first glance are the following:

  1. We could archive it instead maybe? (set is_archived=True)
  2. Do this only for records with created_date older than 1 day? (to avoid running this task over records that are being uploaded at the moment)
  3. When we upload a file, is the front end aware that the file upload to S3 has failed? And, should we support retrying the upload?

@gigincg @vigneshhari what do you think about this?

@gitone912
Copy link

i want to resolve this issue, can i start ?

@yaswanthsaivendra
Copy link
Contributor Author

i want to resolve this issue, can i start ?

No this one is still need to be discussed. Meanwhile , you can work on other issues.

@Ashesh3
Copy link
Member

Ashesh3 commented Jun 1, 2023

@rithviknishad Regarding the relevancy of this issue, I noticed that we do have a pending TODO request about this behavior.

# TODO : Periodic tasks that removes files that were never uploaded

So, maybe we can have a periodic task to check upload_completed and delete incomplete FileUpload objects with a 1 day grace period. Let's still get a second opinion.

@rithviknishad
Copy link
Member

Just adding the stats here of our staging file uploads.

image

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 a pull request may close this issue.

4 participants