From fe3ff10e07eb396ab6fa166d5f09885a05be615e Mon Sep 17 00:00:00 2001 From: cmrd Senya Date: Mon, 29 Jun 2015 16:50:14 +0300 Subject: [PATCH] Add new daily job to clean cache in public/tmp (as suggested in #5946). --- Changelog.md | 1 + app/workers/clean_cached_files.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 app/workers/clean_cached_files.rb diff --git a/Changelog.md b/Changelog.md index d01623e49..2270e6473 100644 --- a/Changelog.md +++ b/Changelog.md @@ -14,6 +14,7 @@ ## Features * Add configuration options for some debug logs [#6090](https://github.com/diaspora/diaspora/pull/6090) * Send new users a welcome message from the podmin [#6128](https://github.com/diaspora/diaspora/pull/6128) +* Cleanup temporary upload files daily [#6147](https://github.com/diaspora/diaspora/pull/6147) # 0.5.1.2 diff --git a/app/workers/clean_cached_files.rb b/app/workers/clean_cached_files.rb new file mode 100644 index 000000000..3497803d8 --- /dev/null +++ b/app/workers/clean_cached_files.rb @@ -0,0 +1,13 @@ +module Workers + class CleanCachedFiles < Base + include Sidetiq::Schedulable + + sidekiq_options queue: :maintenance + + recurrence { daily } + + def perform + CarrierWave.clean_cached_files! + end + end +end