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

[Proposal] Clarify documentation & logging of cleanup job #444

Closed
ghost opened this issue May 13, 2021 · 3 comments
Closed

[Proposal] Clarify documentation & logging of cleanup job #444

ghost opened this issue May 13, 2021 · 3 comments
Milestone

Comments

@ghost
Copy link

ghost commented May 13, 2021

Hello!

Currently the cleanup job section of the documented config is described using terms e.g. 'invalid upload'. This threw me off initially as I thought it had to do with partially uploaded files that need to cleanup. Looking in the code, I deduced that the cleanup job actually does the following:

  • Expired, published shares and their files are removed once the expiration datetime is older than invalid-age.
  • Expired invites are removed based on the invite-time from the signup block.
  • Orphaned files are removed (but this should not happen).

I would propose to clarify the documentation with what the cleanup job entails.

Also, I think it might be worthwhile to include log lines stating the following:

  • At boot, log the interval & invalid age of the cleanup job as received from config on INFO
  • Log at least the name of the share and the user it belonged to on removal on INFO

This allows a sysadmin to confirm if the correct settings are applied and to see what is removed when in case of issues without having to enable debug.

Curious to hear what you think of the proposal! If approved, I will create a PR with the proposed changes.

Thanks in advance!

@eikek
Copy link
Owner

eikek commented May 13, 2021

Hi! yes this sounds all very reasonable. You are correct in all the points. Orphaned files should not happen, actually. It might be nice to have, if one changes the database outside of sharry. I can see how "invalid upload" is a really unfortunate name here. I'm very happy for a PR! Thank you!

@ghost
Copy link
Author

ghost commented May 17, 2021

It was fun getting back into Scala and SQL join queries. Here we are: #453

eikek added a commit that referenced this issue May 18, 2021
#444 Clarify documentation & logging of cleanup job
@ghost
Copy link
Author

ghost commented May 18, 2021

Merged

@ghost ghost closed this as completed May 18, 2021
@eikek eikek added this to the Sharry 1.8.0 milestone May 18, 2021
This issue was closed.
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

No branches or pull requests

1 participant