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

TracyHandler: delete local file after upload #9

Merged
merged 10 commits into from
Aug 5, 2024

Conversation

VojtaStanek
Copy link
Contributor

I have encountered a problem that log directory used all the space on the machine. It doesn't make sense for me to store files locally if the file is uploaded. I have added an option ($removeUploads) to preserve current behavior, but the default is to delete local file.

@JanTvrdik
Copy link
Contributor

The reason the files are kept locally is to prevent duplicate bluescreens from being uploaded (renderToFile returns false in that case). This is important functionality, so we cannot default to deleting them. Truncating them on the other hand should be fine. Or some smart GC would need to be used to delete bluescreens older than some age.

@VojtaStanek VojtaStanek force-pushed the pr/delete-uploads branch 3 times, most recently from 00e9b74 to 5cd32b2 Compare July 29, 2024 09:17
@VojtaStanek
Copy link
Contributor Author

Makes sense. I have changed it so that:

  • The file contents is replaced with a small string.
  • After few days files are deleted.

@JanTvrdik JanTvrdik merged commit 2a85dd7 into mangoweb-backend:master Aug 5, 2024
2 checks passed
@JanTvrdik
Copy link
Contributor

Thank you. I fixed few minor issues (clock usage, consistent UTC usage, ! to force reset time to 00:00, ...) and merged it.

@VojtaStanek
Copy link
Contributor Author

VojtaStanek commented Aug 7, 2024 via email

@VojtaStanek VojtaStanek deleted the pr/delete-uploads branch August 7, 2024 19:57
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