Skip to content

Clean carrierwave tempfiles

What does this MR do?

It adds a cron job for cleaning tempfiles created by carrierwave gem.

Are there points in the code the reviewer needs to double check?

Carrierwave has its own method to clean tempfiles, but it works only if cache_dir is set by default.
In GitLab cache_dir is being redefined per project in file_uploader.rb so CarrierWave.clean_cached_files! doesn't work.

Why was this MR needed?

Tempfiles are created every time when a file is being uploaded.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #28540 (closed)

Merge request reports