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

Add task to clean up shared files regularly #90

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

mkangia
Copy link
Contributor

@mkangia mkangia commented Dec 15, 2024

https://dimagi.atlassian.net/browse/SC-4051

Delete shared temporary files after a certain period periodically

Copy link
Contributor

@Charl1996 Charl1996 left a comment

Choose a reason for hiding this comment

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

Looks good!

Curious why you didn't opt for a server cron task?

Just to be clear, I don't have a problem with the task in the code (in fact, it's easier to maintain I think), but just wondering how you thought about it.

@mkangia
Copy link
Contributor Author

mkangia commented Dec 16, 2024

Hey @Charl1996

Ya, good question.

It was definitely the maintainability as you mentioned.
Additionally visibility that the files are removed by having the task in this code instead of the ansible repo, plus, having it easily configurable here via superset config.

But overall,
I would think of log files or such to be cleaned via cron but files generated by the application to be removed by application itself.

@Charl1996
Copy link
Contributor

files generated by the application to be removed by application itself

That's a good point

@mkangia mkangia merged commit 03a09f9 into master Dec 16, 2024
3 checks passed
@mkangia mkangia deleted the mk/4051-cleanup-shared-files branch December 16, 2024 07:35
@mkangia mkangia mentioned this pull request Dec 16, 2024
@mkangia
Copy link
Contributor Author

mkangia commented Dec 16, 2024

A bug in setting up the task, resolved in #91

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.

2 participants