-
Notifications
You must be signed in to change notification settings - Fork 5
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 cron service and cleanup script #167
Conversation
synapse_rock/cron/cron.weekly/remote_content_empty_directory_cleanup.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license-eye has totally checked 115 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
51 | 2 | 62 | 0 |
Click to see the invalid file list
- synapse_rock/cron/cron.weekly/remote_content_empty_directory_cleanup.py
- synapse_rock/scripts/run_cron.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Test coverage for 5b7a9e8
Static code analysis report
|
* Add cron service and cleanup script * Fix rockfile * Fix restart_synapse() * Remove unused fn * Fix restart_synapse() * Fix linting * Fix rockfile * Throttle cleanup operations * Add missing headers * Add some licensing exceptions * Try to fix headers ignore once again * Make scripts added to the rock executable * Rerun CI * Only modify rockcraft.yml where necessary * Fix rockcraft scripts permissions * Fix typo --------- Co-authored-by: Amanda H. L. de Andrade Katz <amanda.katz@canonical.com> Co-authored-by: arturo-seijas <102022572+arturo-seijas@users.noreply.github.com>
Overview
Synapse can leave empty directories in the media directory after deleting old/unused files. There is currently no option to remove them and they can accumulate, using inodes and space.
This PR adds a cron service inside the workload container to regularly launch a script meant to delete those empty directories.
The PR was structure to simplify the future addition of scripts that should be handled by the cron service. Just add them in the corresponding
cron.{hourly,daily,weekly,monthly}
directory.Remarks:
Checklist
src-docs
urgent
,trivial
,complex
)